距离计算 - iOS:如何利用百度地图api计算两点间的实际距离?
伊谢尔伦
伊谢尔伦 2017-04-17 17:46:07
0
1
478

小弟在做利用百度地图api计算两点间的距离的功能

官方就给了这三行代码:

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

可是复制-粘贴-报错,

错误提示: Implicit declaration of function 'BMKMapPointForCoordinate' is invalid in C99

什么情况?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
小葫芦

Sorry, I forgot the header file, I’m so sorry

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!