Contents

canDrawMapRect:zoomScale:

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

Declaration

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

Parameters

  • mapRect:

    The map rectangle that needs to be updated.

  • zoomScale:

    The current scale factor applied to the map.

Return Value

true if this view is ready to draw its contents or false if it is not.

Discussion

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 false from this method to indicate that it is not ready.

If you return false 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 true.

See Also

Drawing the overlay