![iOS 计算两个坐标之间的距离 iOS 计算两个坐标之间的距离](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
//第一个坐标
CLLocation *before=[[CLLocation alloc] initWithLatitude:29.553968 longitude:106.538872];
//第二个坐标
CLLocation *current=[[CLLocation alloc] initWithLatitude:29.552959 longitude:106.537199];
// 计算距离
CLLocationDistance meters=[current distanceFromLocation:before];
NSLog(@"-------%lf",meters);