iOS百度地图计算两个经纬度之间的距离

BMKMapPoint point1 = BMKMapPointForCoordinate(CLLocationCoordinate2DMake(, ));

BMKMapPoint point2 = BMKMapPointForCoordinate(CLLocationCoordinate2DMake(, ));

CLLocationDistance distance = BMKMetersBetweenMapPoints(point1,point2);

网上和百度地图的文档中都很容易找到这个方法,但是却没有说需要导入头文件

导入BaiduMapAPI_Utils头文件即可.

Ray.

你可能感兴趣的:(iOS百度地图计算两个经纬度之间的距离)