Displaying images in the maptip

493
1
02-28-2014 08:25 AM
srikanthpilli
New Contributor II
When I mouse over the feature - I want to display the image in the maptip - which is referenced through hyperlink in the "img" field.

Field: img
Value: http://wmoap21/ways/images/dscn6305.jpg

Thanks for going through this message and providing your inputs.
0 Kudos
1 Reply
AhmedEl-Sisi
Occasional Contributor III
You can customize your maptip template to show image from a field.
You should add Image control to  your template and bind the source to your filed as the following:
   <esri:FeatureLayer.MapTip>
                    <Grid Background="Blue">
                        <StackPanel Margin="5">
                            <Image Source="{Binding [img]}" Height="150" Width="150"/>
                        </StackPanel >
                    </Grid>
   </esri:FeatureLayer.MapTip>


Just make sure to add your "img" field to your featurelayer OutFields property.

also you can check the following sample for more information:
https://developers.arcgis.com/silverlight/sample-code/start.htm#FeatureLayerMapTips
0 Kudos