地图相关知识点
作者:
JimmyL | 来源:发表于
2018-05-21 09:54 被阅读63次
计算两个经纬度的距离
CLLocation *orig=[[[CLLocation alloc] initWithLatitude:[mainDelegate.latitude_self doubleValue] longitude:[mainDelegate.longitude_self doubleValue]] autorelease];
CLLocation* dist=[[[CLLocation alloc] initWithLatitude:[tmpNewsModel.latitude doubleValue] longitude:[tmpNewsModel.longitude doubleValue] ] autorelease];
CLLocationDistance kilometers=[orig distanceFromLocation:dist]/1000;
NSLog(@"距离:",kilometers);
本文标题:地图相关知识点
本文链接:https://www.haomeiwen.com/subject/wnxfjftx.html
网友评论