Esri ArcGIS extent finished rendering/downloading tiles notification

572
2
03-23-2017 03:13 AM
chiragshah4
New Contributor II

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
Occasional Contributor II

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
Occasional Contributor II

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