silverlight   发布时间:2022-05-03  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Feature Service(二)Silverlight API在线编辑大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

通过Featureservice+Silverlight API实现在线编辑     上篇文章中已经介绍了Feature service的一些特性和基本的发布方式,那么在这篇文章中重点介绍一下如何使用feature service去实现在线编辑。那么有两种方式访问Feature service:      1、通过ArcGISDeskTop的方式。      2、通过ArcGISServer AP

通过@H_197_20@Featureservice+Silverlight API@H_197_20@实现在线编辑@H_197_20@
    @H_197_20@上篇文章已经介绍了@H_197_20@Feature service@H_197_20@的一些特性和基本的发布方式,那么在这文章中重点介绍一下如何使用@H_197_20@feature service@H_197_20@去实现在线编辑。那么有两种方式访问@H_197_20@Feature service@H_197_20@:@H_197_20@
     1@H_197_20@、通过@H_197_20@ArcGISDeskTop@H_197_20@的方式。@H_197_20@
     2@H_197_20@、通过@H_197_20@ArcGISServer API@H_197_20@的方式,现在已经有两种@H_197_20@API@H_197_20@可以访问@H_197_20@Feature service@H_197_20@,它们是@H_197_20@Javascript. API@H_197_20@、@H_197_20@Silverlight API@H_197_20@,今天我重点介绍一下如何通过@H_197_20@SilverlightAPI@H_197_20@去访问和编辑@H_197_20@Featureservice@H_197_20@。@H_197_20@
@H_197_20@如何实现:@H_197_20@
@H_197_20@
    @H_197_20@开发环境:@H_197_20@
    @H_197_20@开发@H_197_20@Featureservice@H_197_20@需要@H_197_20@ArcGISServer 10@H_197_20@、@H_197_20@VisualStadio 2010@H_197_20@英文版(目前中文不支持@H_197_20@Silverlight4@H_197_20@的@H_197_20@Tools@H_197_20@)、@H_197_20@Silverlight Developer Kit@H_197_20@、@H_197_20@arcgis server API for Silverlight2.0_RC@H_197_20@(正式版还没有发布)。@H_197_20@
    @H_197_20@在@H_197_20@SilverlightAPI 2.0@H_197_20@中,提供了@H_197_20@EditWidget@H_197_20@控件,如果对界面定制要求不高的话,可以直接使用该控件。@H_197_20@
    @H_197_20@下面是实现的代码:@H_197_20@
<UserControl x:Class=”Feature_service.MainPage”
    xmlns=”http://@R_944_10906@mas.microsoft.com/winfx/2006/xaml/presentation”
    xmlns:x=”http://@R_944_10906@mas.microsoft.com/winfx/2006/xaml”
    xmlns:d=”http://@R_944_10906@mas.microsoft.com/expression/blend/2008″
   xmlns:mc=”http://@R_944_10906@mas.openxmlformats.org/markup-compatibility/2006″
    mc:Ignorable=”d”
    xmlns:esri=”http://@R_944_10906@mas.esri.com/arcgis/client/2009″>
    <Grid x:Name=”LayoutRoot” >
        <!–@H_197_20@地图控件@H_197_20@–>
        <esri:Map x:Name=”Mymap”Extent=”-122.655,37.666,-122.181,37.897″>
<!–@H_197_20@比例尺控件@H_197_20@–>
           <esri:Map.Template>
               <ControlTemplate>
                   <Grid BACkground=”{TemplateBinding BACkgrounD}”>
                       <Grid x:Name=”RootElement” Width=”Auto” Height=”Auto” />
                       <Rectangle x:Name=”ZoomBox” Fill=”#55FFFFFF” stroke=”Green”strokeThickness=”2″ Visibility=”Collapsed” />
                       <StackPanel rientation=”Vertical” HorizontalAlignment=”Left”VerticalAlignment=”Bottom”>
                           <esri:ScaleBar x:Name=”MyScaleBar” Margin=”5″ MapUnit=”decimaldegrees”Foreground=”Black”
                                          DisplayUnit=”Miles” Map=”{Binding ElementName=Mymap}” />
                           <TextBlock Text=”{Binding ElementName=Mymap,Path=Layers.[0].CopyrightText}”Margin=”5″ />
                       </StackPanel>
                   </Grid>
               </ControlTemplate>
           </esri:Map.Template>
           <esri:ArcGISTiledMapserviceLayer ID=”MyLayer”
               Url=”http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer”/>
            <!–@H_197_20@点图层@H_197_20@–>
           <esri:FeatureLayer ID=”Point”Url=”http://localhost/ArcGIS/rest/services/Featureservice/FeatureServer/0″AutoSave=”false”  utFields=”*” Mode=”ondemand”></esri:FeatureLayer>
            <!–@H_197_20@线图层@H_197_20@–>
           <esri:FeatureLayer ID=”Line”Url=”http://localhost/ArcGIS/rest/services/Featureservice/FeatureServer/1″AutoSave=”false”  utFields=”*” Mode=”ondemand”></esri:FeatureLayer>
            <!–@H_197_20@面图层@H_197_20@–>
           <esri:FeatureLayer ID=”Polygon”Url=”http://localhost/ArcGIS/rest/services/Featureservice/FeatureServer/2″AutoSave=”false”  utFields=”*”Mode=”ondemand”></esri:FeatureLayer>
        </esri:Map> 
        <StackPanel x:Name=”EditorTool@R_675_10495@p” Margin=”0,5,0″ >
            <BorderBACkground=”#FF84AD62″ BorderThickness=”1″ CornerRadius=”5″
                      HorizontalAlignment=”Right”  VerticalAlignment=”Top”
                       Padding=”5″BorderBrush=”Black”>
               <Border.Effect>
                   <DropShadowEffect Color=”Black” Direction=”-45″ BlurRadius=”20″ pacity=”.75″/>
               </Border.Effect>
               <StackPanel rientation=”Vertical” HorizontalAlignment=”Right”Margin=”0,0″    VerticalAlignment=”Top” >
                   <esri:EditorWidget Map=”{Binding ElementName=Mymap}”
                                     Width=”300″
                                     LayerIDs=”Point,Line,Polygon”
                                     AutoSELEct=”false”                                  GeometryserviceUrl=”http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer”
                                     ShowAttributesOnAdd=”True”  />
               </StackPanel>
           </Border>
        </StackPanel>
    </Grid>
</UserControl>
    @H_197_20@其中的点、线、面图层是在本机发布的@H_197_20@Feature service@H_197_20@。@H_197_20@
    @H_197_20@下面是运行后的结果:@H_197_20@

下面用@H_197_20@ArcMap@H_197_20@打开这两个图层,看看数据是否已经被编辑了。@H_197_20@@H_197_20@

后面的文章中,我会介绍如何定制@H_197_20@@H_197_20@ Featureservice@H_197_20@ 的开发。@H_197_20@

大佬总结

以上是大佬教程为你收集整理的Feature Service(二)Silverlight API在线编辑全部内容,希望文章能够帮你解决Feature Service(二)Silverlight API在线编辑所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。