CoreLocation的两个坐标之间的距离

问题描述:

我需要计算两个坐标之间的距离(以米和英里为单位)

I need to calculate the distance (in meters and miles) between two coordinates given

我该怎么做?

返回从接收器坐标到指定位置坐标的距离(以米为单位)。

Returns the distance (in meters) from the receiver’s coordinate to the coordinate of the specified location.

// Deprecated in iOS 3.2 method
- (CLLocationDistance)getDistanceFrom:(const CLLocation *)location

// Correct method
- (CLLocationDistance)distanceFromLocation:(const CLLocation *)location

CLLocation