Nic Hubbard Nic Hubbard - 1 year ago 157
iOS Question

iOS: Notification when MKMapView is loaded and annotations/overlays are added?

I am aware of the delegate methods used to let me know when the map has loaded and annotations and overlays have been added. (


I am wanting to create a
from my
once everything has loaded. Currently I am creating my
is called, but this is not always reliable, because sometimes the overlay take longer to be added, sometimes
is called more than once or it takes a long time to load. Sometimes it is NOT called because tiles are cached. So, it is very hard to know exactly when everything has loaded. I have tried using a timer but that doesn't make it reliable either.

My question is, how can I know when everything has completely loaded, including all map tiles, all annotations and all overlays?

Answer Source

It's an old question, but if you're using iOS 7 just use the mapView mapViewDidFinishRenderingMap delegate.

- (void)mapViewDidFinishRenderingMap:(MKMapView *)mapView fullyRendered:(BOOL)fullyRendered
    // Image creation code here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download