我已经实现了一个在两个点之间绘制路线的方法,但路线不在道路上。我怎么才能只在路上画路线呢?
coordinateArray[0] = CLLocationCoordinate2DMake(appDelegate.latitude, appDelegate.longitude);
coordinateArray[1] = CLLocationCoordinate2DMake(appDelegate.latitude2, appDelegate.longitude2);
self.routeLine = [MKPolyline polylineWithCoordinates:coordinateArray count:2];
[self.myMapView setVisibleMapRect:[self.routeLine boundingMapRect]];
[self.myMapView addOverlay:self.routeLine];发布于 2013-01-10 00:07:00
这非常有帮助((:使用Google Maps API https://github.com/Surya121/SBMapWithRoute的MKPolyline
https://stackoverflow.com/questions/14234270
复制相似问题