Contents

mapRect(for:)

Returns the rectangle on the map that corresponds to the specified rectangle in the overlay renderer’s drawing area.

Declaration

func mapRect(for rect: CGRect) -> MKMapRect

Parameters

  • rect:

    The rectangle in the overlay’s drawing area that you want to convert.

Return Value

The rectangle on the two-dimensional map projection corresponding to the specified rectangle.

Discussion

You may call this method safely from your view’s draw(_:zoomScale:in:) method.

See Also

Converting points on the map