By default, snap key is Ctrl-key and snap distance is 15. If you are using Draw or Editor, you overwrite the default in the same way esri:Editor.SnapDistance="20" esri:Editor.SnapKey="S"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009"> <Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <esri:Editor x:Key="MyRedEditor" Map="{Binding ElementName=MyMap}" LayerIDs="Red"/> <esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" /> <esri:Editor x:Key="MyBlueEditor" Map="{Binding ElementName=MyMap}" LayerIDs="Blue"/> <esri:SimpleFillSymbol x:Key="RedSymbol" Fill="Red"/> <esri:SimpleFillSymbol x:Key="BlueSymbol" Fill="Blue"/> <esri:SimpleLineSymbol x:Key="RedLineSymbol" Color="Red" Width="5"/> </Grid.Resources> <esri:Map x:Name="MyMap"> <esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer"/> <esri:GraphicsLayer ID="Red"/> <esri:GraphicsLayer ID="Blue"/> <esri:GraphicsLayer ID="Line" Visible="True"> <esri:Graphic Symbol="{StaticResource RedLineSymbol}" > <esri:Polyline > <esri:Polyline.Paths> <esri:PointCollection> <esri:MapPoint X="-118.169" Y="34.016" /> <esri:MapPoint X="-104.941" Y="39.7072" /> <esri:MapPoint X="-96.724" Y="32.732" /> <esri:MapPoint X="-87.671" Y="41.804" /> <esri:MapPoint X="-74" Y="40.68" /> </esri:PointCollection> </esri:Polyline.Paths> </esri:Polyline> </esri:Graphic> </esri:GraphicsLayer> </esri:Map> <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center"> <Button Content="AddBlue" DataContext="{StaticResource MyBlueEditor}" Command="{Binding Add}" CommandParameter="{StaticResource BlueSymbol}"/> <Button Content="AddRed" DataContext="{StaticResource MyRedEditor}" Command="{Binding Add}" CommandParameter="{StaticResource RedSymbol}"/> <Button Content="EditVertices" DataContext="{StaticResource MyEditor}" Command="{Binding EditVertices}" /> <CheckBox x:Name="LineVisible" DataContext="{Binding ElementName=MyMap, Path=Layers[Line]}" Content="Line layer visiblity" IsChecked="{Binding Visible, Mode=TwoWay}" /> </StackPanel> </Grid>
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.