Instance Method


Returns a Boolean value indicating whether the overlay view is ready to draw its content.


- (BOOL)canDrawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale;



The map rectangle that needs to be updated.


The current scale factor applied to the map.

Return Value

YES if this view is ready to draw its contents or NO if it is not.


Overlay views can override this method in situations where they may depend on the availability of other information to draw their contents. For example, an overlay view showing traffic information might want to delay drawing until it has all of the traffic data it needs. In such a case, it can return NO from this method to indicate that it is not ready.

If you return NO from this method, your application is responsible for calling the setNeedsDisplayInMapRect:zoomScale: method when the overlay view subsequently becomes ready to draw its contents.

The default implementation of this method returns YES.

See Also

Drawing the Overlay

- drawMapRect:zoomScale:inContext:

Draws the contents of the overlay view.

- setNeedsDisplayInMapRect:

Invalidates the view in the given map rectangle at all zoom scales.

- setNeedsDisplayInMapRect:zoomScale:

Invalidates the view in the given map rectangle but only at the specified zoom scale.