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) -> MKMapRectParameters
- 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.