Instance Method

convert(_:toCoordinateFrom:)

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

Declaration

iOS, Mac Catalyst, tvOS
func convert(_ point: CGPoint, toCoordinateFrom view: UIView?) -> CLLocationCoordinate2D
macOS
func convert(_ point: CGPoint, toCoordinateFrom view: NSView?) -> CLLocationCoordinate2D

Parameters

point

The point you want to convert.

view

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

Return Value

The map coordinate at the specified point.

See Also

Converting Map Coordinates

func convert(CLLocationCoordinate2D, toPointTo: UIView?) -> CGPoint

Converts a map coordinate to a point in the specified view.

func convert(MKCoordinateRegion, toRectTo: UIView?) -> CGRect

Converts a map region to a rectangle in the specified view.

func convert(CGRect, toRegionFrom: UIView?) -> MKCoordinateRegion

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