Add an attachment image to popup infoWindow for ArcGIS API for silverlight

3822
4
11-03-2015 05:52 AM
soumahorosahi_ibrahim
New Contributor

Hello guys,

I'm suppose to show image photo on a click event(specific point) in a pop up infoWindow from a service

which has an attachements . The attachement has set of photos .

Best Regds,

Ibrahim Sahi

Developer intern at CNTIG

0 Kudos
4 Replies
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Ibrahim,

This is a pretty good question. Based on my knowledge, in order to accomplish this task, you need to use AttachmentEditor​ & InfoWindow Class. You can take a deep look about that AttachmentEditor link and try to connect attachments by click features on map, and then you can try to merge this function within the info window.

You can based on this infoWindow sample to extend the attachmentEditor function to access the attachment to infoWindow popup.

Essentially, the logic is:

1. Get connect to attachment to feature services by using AttachmentEditor

2. Use infoWindow class to wire up the attachments

Hope this can help.

Best Regards,


Nathan

ReneRubalcava
Frequent Contributor

This is a pretty old, but the basics are the same.

Add an attachment image to popup infoWindow for ArcGIS JavaScript API. · GitHub

When you have the graphic you can query the attachments from FeatureLayer and display images in the popup.

0 Kudos
Asgharkhan
Occasional Contributor

The best way for this i know for silverlight is use custom tool tip control template, then bind it with images.  The only problem is its work on hover not on click...

0 Kudos
soumahorosahi_ibrahim
New Contributor

Thank you  guys for all your replies im gonna try all the methods and keep you update asap thanks !

0 Kudos