Select to view content in your preferred language

Esri ArcGIS extent finished rendering/downloading tiles notification

896
2
03-23-2017 03:13 AM
chiragshah4
Emerging Contributor

I need notification when full map render or downloaded so i will export the screenshot. Right now my screenshot taken before map rendering completed that why wrong screenshot display. I android there is one Listener addDrawStatusChangedListener . Any equivalent in ios 100 sdk.

0 Kudos
2 Replies
DavidLednik
Frequent Contributor

Hi!

All 100.0 releases of the API have drawStatus which indicates when the map finished drawing. So until all the tiles are downloaded and rendered, status will be inProgress. Once done it will indicate Completed status.

You can add an observer for that property. And once it's completed you can export the image with 

mapView.exportImage

mapView.addObserver(self, forKeyPath: "drawStatus", options: .new, context: &myContext)

regards,

David

GagandeepSingh
Frequent Contributor

To add to David Lednik‌'s answer. We have a sample - Display drawing status - you can refer. And when using KVOs don't forget to remove the observer, when you are done. Otherwise, it can cause problems later.

0 Kudos