//获得当前位置和指定位置之间的距离   

    BMKMapPoint point1 = BMKMapPointForCoordinate(CLLocationCoordinate2DMake(39.915,116.404));
    BMKMapPoint point2 = BMKMapPointForCoordinate(CLLocationCoordinate2DMake(38.915,115.404));
    CLLocationDistance distance = BMKMetersBetweenMapPoints(point1,point2);

    NSLog(@" 距离为%@ ",[NSString stringWithFormat:@"%0.2f公里",distance/1000]);

相关文章:

  • 2021-12-20
  • 2022-12-23
  • 2021-07-06
  • 2021-11-11
  • 2022-12-23
  • 2022-02-08
  • 2021-11-27
猜你喜欢
  • 2021-06-10
  • 2022-01-02
  • 2022-12-23
  • 2022-02-04
  • 2021-11-27
相关资源
相似解决方案