<Grid.Resources> <esri:GraphicCollection x:Key="MyGraphicCollection"/> <!--more code goes here --> </Grid.Resources> <!--more code goes here --> <esri:GraphicsLayer ID="MyGraphicsLayer" Graphics="{Binding Source={StaticResource MyGraphicCollection}, Path=Graphics}" Renderer="{StaticResource MyRenderer}"/>
<TextBox Width="50" Text="{Binding [STATE_NAME], Mode=TwoWay}" DataContext="{Binding ElementName=MyMap, Path=Layers[MyGraphics].Graphics[0].Attributes}"/>
<Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol" Color="Red" Size="12" Style="Circle" /> </Grid.Resources> <esri:Map x:Name="MyMap" Background="White"> <esri:ArcGISTiledMapServiceLayer ID="PhysicalTiledLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/NPS_Physical_World_2D/MapServer"/> <esri:GraphicsLayer ID="MyGraphics" MouseLeftButtonDown="GraphicsLayer_MouseLeftButtonDown"> <esri:GraphicsLayer.Graphics > <esri:Graphic Symbol="{StaticResource RedMarkerSymbol}" > <esri:MapPoint X="-140.9" Y="63.391" /> </esri:Graphic> </esri:GraphicsLayer.Graphics> </esri:GraphicsLayer> </esri:Map> <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" > <TextBox Width="50" Text="{Binding [STATE_NAME], Mode=TwoWay}" DataContext="{Binding ElementName=MyMap, Path=Layers[MyGraphics].Graphics[0].Attributes}"/> </StackPanel> </Grid>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.