iOS-根据两个经纬度计算相距距离

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.cnblogs.com/WJJ-Dream/p/5786975.html