Instance Method

rectForMapRect:

Returns the rectangle in the overlay view that corresponds to the specified rectangle on the map.

Declaration

- (CGRect)rectForMapRect:(MKMapRect)mapRect;

Parameters

mapRect

A rectangle on the two-dimensional map projection.

Return Value

The rectangle specified in the receiver’s coordinate system.

Discussion

Because the bounds and frame rectangles of an overlay view do not change after the view has been created, you may call this method from multiple threads simultaneously. Therefore, you may call this method safely from your view’s drawMapRect:zoomScale:inContext: method.

See Also

Converting Points on the Map

- pointForMapPoint:

Returns the point in the overlay view that corresponds to specified point on the map.

Deprecated
- mapPointForPoint:

Returns the map point that corresponds to the specified point in the overlay view.

Deprecated
- mapRectForRect:

Returns the map rectangle that corresponds to the rectangle in the overlay view’s coordinate system.

Deprecated