我已经实现了一种在2点之间绘制路线的方法,但路线不在路上。我怎样才能在路上划出路线?
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];