本文介绍了如何测量两个CLLocations之间的距离(以米为单位)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获得两个 CLLocation
之间的距离(以米为单位)? CLLocation
没有提供任何方法来实现它。
解决方案
pre> CLLocationDistance distance = [aCLLocationA distanceFromLocation:aCLLocationB];
// distance是以米为单位的双精度表示距离
How can I get the distance in meters between two CLLocation
s? CLLocation
doesn't provide any method to do it, it seeems.
解决方案
CLLocationDistance distance = [aCLLocationA distanceFromLocation:aCLLocationB];
// distance is a double representing the distance in meters
这篇关于如何测量两个CLLocations之间的距离(以米为单位)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!