小弟在做利用百度地图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
什么情况?
Sorry, I forgot the header file, I’m so sorry