【发布时间】:2012-03-09 17:28:15
【问题描述】:
我想计算当前位置与其他位置之间的道路距离。我使用哪个(XML/JSON Google 方向或任何其他)API(如果有)或正确的方法是什么。?
在我尝试以下操作之前。但我想要道路距离
谢谢。
CLLocation *location1 = [[CLLocation alloc] initWithLatitude:lat1 longitude:long1];
CLLocation *location2 = [[CLLocation alloc] initWithLatitude:lat2 longitude:long2];
NSLog(@"Distance in meters: %f", [location1 getDistanceFrom:location2]);
【问题讨论】:
标签: iphone ios json cllocation