IOS计算两点之间的距离

 1 //广州经纬度
 2 CLLocationCoordinate2D guangZhouLocation;
 3 guangZhouLocation.latitude = 23.20;
 4 guangZhouLocation.longitude = 113.30;
 5 BMKMapPoint guangZhou = BMKMapPointForCoordinate(guangZhouLocation);
 6 
 7 //深圳经纬度
 8 CLLocationCoordinate2D shenZhenLocation;
 9 shenZhenLocation.latitude = 22.33;
10 shenZhenLocation.longitude = 114.07;
11 BMKMapPoint shenZhen = BMKMapPointForCoordinate(shenZhenLocation);
12 
  //计算广州与深圳的距离
13
CLLocationDistance distance = BMKMetersBetweenMapPoints(guangZhou,shenZhen); 14 NSLog(@"距离:%f",distance);
原文地址:https://www.cnblogs.com/wangshengl9263/p/3327707.html