Hi All,
We are currently developing an App which can show popups with feature attributes including image attachments when clicking on the features. The attachments are shown as thumbnails in the popup. Does anybody know how we could get an enlarged (e.g. full-size) image popped up when we click on the thumbnails of the image attachments? Any help would be greatly appreciated.
Thank you for your question! Are you using the SDK's `AGSPopupsViewController` class to display your popups? If so, that will handle displaying full-size images from the attachments. You can look at the following sample for an example of how to use `AGSPopupsViewController`:
You can also download the sample application from the App Store or download the GitHub repo and build/run it locally to see how it works.
If you are writing you're own popup viewer, you can either fetch and load the attachments using the `AGSArcGISFeature.fetchAttachmentsWithCompletion` method or use the `AGSPopupAttachmentManager` and `AGSPopupAttachment` classes to handle a lot of the work for you. Once you have the attachment image you would display that in a new `UIImageView`.
Let me know if that doesn't answer your question or you need more info,
Mark
Hi Mark,
Thank you for your quick response! Yes, I am using the SDK's `AGSPopupsViewController` class and your suggestion helped a lot. Now I am able to display full-size images when clicking on the thumbnails of images in the popups.
Thanks a lot!
Excellent, glad you got it working! If you have any more questions, please let me know.
Mark