2

I am wanting to take the labels/attributes that are used in arcMap and display them in an InfoWindow when the user clicks on the map point. I really have no idea where to start on this so any help would be appreciated. I have attached a screen shot of my arcMap with the labels as well as a screen shot of where I am wanting the labels to appear. If you look at the picture titled 'InfoWindow,' Utah is displayed when the user clicks on the state.

Here is the xaml I have used with my maps so far:

<esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True" MouseClick="MyMap_MouseClick" MouseRightButtonDown="MyMap_MouseRightButtonDown" Extent="-9834972.92753924,4441899.425293319,-9833977.88119163, 4442762.485358352">
                <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:ArcGISDynamicMapServiceLayer  ID="ID" Url="This is where the URL is."/>
</esri:Map>

            <Border Background="{StaticResource PanelGradient}" BorderThickness="1" CornerRadius="5"
            HorizontalAlignment="Left"  VerticalAlignment="Top"
            Margin="20" Padding="5" BorderBrush="Black" >
                <esri:Legend Map="{Binding ElementName=MyMap}"
                         LayerIDs="ID"
                         LayerItemsMode="Tree"
                         ShowOnlyVisibleLayers="False"
                         Refreshed="Legend_Refreshed">
                    <esri:Legend.MapLayerTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox Content="{Binding Label}"
                                    IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                                    IsEnabled="{Binding IsInScaleRange}" >
                                </CheckBox>
                                <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />
                            </StackPanel>
                        </DataTemplate>
                    </esri:Legend.MapLayerTemplate>
                    <esri:Legend.LayerTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Label}"
                            IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                            IsEnabled="{Binding IsInScaleRange}" >
                            </CheckBox>
                        </DataTemplate>
                    </esri:Legend.LayerTemplate>
                </esri:Legend>
            </Border>

If you have any questions, do not hesitate to ask! Thanks again! Labels InfoWindow

6
  • If this is using the ArcGIS API for Silverlight then you may want to put a title and tag(s) on it that attracts AGS/Silverlight developers to it - at the moment I suspect they will see the title and think its ArcGIS for Desktop.
    – PolyGeo
    Oct 28, 2012 at 23:36
  • I do not see any screenshots.
    – blah238
    Oct 31, 2012 at 6:32
  • Sorry about that. I completely forgot to add them. You should now see the pictures. Thank you for letting me know.
    – JLott
    Nov 1, 2012 at 19:09
  • I am still confused, perhaps even moreso now :) What do ArcMap and the ArcGIS Silverlight API have to do with each other? Are you developing an ArcMap customization or a Silverlight application?
    – blah238
    Nov 1, 2012 at 19:55
  • Haha sorry about that. I am developing a WPF application. I am using arcMap to create the map package that I am using in the application. arcMap has all of the data in it and I can make the labels show up. I would like to be able to make the labels show up in the info windows. Or at least be able to pull the information out of the arcMap and display it in the info window.
    – JLott
    Nov 1, 2012 at 19:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.