Hi everyone,
Can anyone help me with how to display service metadata for a feature layer? I can easily access this information for a DynamicMapServiceLayer (using the Description and CopyrightText properties), but I can't do this for a feature layer. I need to both query and render my data, so I have to use a feature layer.
Has anyone else been able to do this? This xaml (from the layerlist sample) works splendidly for the ESRI dynamic service, and for my own DynamicMapServiceLayers, but not when I restrict it to an individual layer within the service. On the sublayer list sample, there is no discussion of metadata.
Thanks all!
sample code:
<ListBox x:Name="MyList" ItemsSource="{Binding Layers, ElementName=MyMap}" BorderBrush="#FF6C7E29">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<!--Layer visibility checkbox-->
<CheckBox IsChecked="{Binding Visible, Mode=TwoWay}" />
<!--Layer name-->
<TextBlock Text="{Binding ID, Mode=OneWay}" Margin="5,0,0,0" >
<!-- Tooltip on hover-->
<ToolTipService.ToolTip>
<StackPanel MaxWidth="400">
<TextBlock FontWeight="Bold" Text="{Binding CopyrightText}" TextWrapping="Wrap" />
<TextBlock Text="{Binding Description}" TextWrapping="Wrap" />
</StackPanel>
</ToolTipService.ToolTip>
</TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>