Contents

convert(_:toRegionFrom:)

Converts a rectangle in the specified view’s coordinate system to a map region.

Declaration

func convert(_ rect: CGRect, toRegionFrom view: UIView?) -> MKCoordinateRegion
func convert(_ rect: CGRect, toRegionFrom view: NSView?) -> MKCoordinateRegion

Parameters

  • rect:

    The rectangle you want to convert.

  • view:

    The view that serves as the reference coordinate system for the rect parameter.

Return Value

The map region corresponding to the specified view rectangle.

See Also

Converting map coordinates