Instance Method

distance(to:)

Returns the number of meters between two map points.

Declaration

func distance(to b: MKMapPoint) -> CLLocationDistance

Parameters

a

The first map point.

b

The second map point.

Return Value

The number of meters between the specified map points.

Discussion

This distance reflects the actual distance between the two points on the surface of the globe, taking into account the curvature of the Earth.

See Also

Getting the Distance Between Points

func MKMetersPerMapPointAtLatitude(CLLocationDegrees) -> CLLocationDistance

Returns the distance spanned by one map point at the specified latitude.

func MKMapPointsPerMeterAtLatitude(CLLocationDegrees) -> Double

Returns the number of map points that represent one meter at the given latitude.