Select to view content in your preferred language

HTML Popups for Silverlight?

964
2
11-16-2011 05:11 AM
BrentStevener
Deactivated User
Is there a sample that shows how to apply the HTML popups for features using Silverlight? For instance:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/StantonCountyKSLeases/MapServer...

The HTML popup seems to be accessible through REST, so is there an easy way to wire these up to show for our features when you hover over them?
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
We support webmap popups as seen in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#WebMapNotesPopups.

But the HTML popup from feature url you provided is not supported. You could however get the same information from your MapTip since the HTML popup only displayed graphic.Attributes. If you set FeatureLayer.OutFields to "*", you will get all fields in the MapTip.

    <esri:FeatureLayer.MapTip>
     <Grid>
      <Grid.ColumnDefinitions>
       <ColumnDefinition Width="Auto"/>
       <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <ItemsControl ItemsSource="{Binding Keys}" Grid.Column="0" />
      <ItemsControl ItemsSource="{Binding Values}" Grid.Column="1" />
     </Grid>
    </esri:FeatureLayer.MapTip>
0 Kudos
BrentStevener
Deactivated User
Thanks. The sample only lists fields, but if the user changes this to be a custom HTML popup displaying a variety of information (images, links, etc), then it would be good to be able to have the ability to wire these up.
0 Kudos