我有一个应用程序,我在mkmapkit中显示折线像这样 -
self.routeLine = [MKPolyline polylineWithCoordinates:coordinateArray count:4];
//[self.mapView setVisibleMapRect:[self.routeLine boundingMapRect]]; //If you want the route to be visible
[self.mapView addOverlay:self.routeLine];
-(MKPolylineRenderer *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay
{
if(overlay == self.routeLine)
{
if(nil == self.routeLineView)
{
self.routeLineView = [[MKPolylineRenderer alloc] initWithPolyline:self.routeLine];
self.routeLineView.fillColor = [UIColor redColor];
self.routeLineView.strokeColor = [UIColor redColor];
self.routeLineView.lineWidth = 2;
}
return self.routeLineView;
}
return nil;
}
现在我想在折线上添加一个箭头来显示这个方向
How to draw an arrow on every polyline segment on Google Maps V3
。我google了相同但到目前为止没有运气。任何人都可以指导我如何实现这个目标吗?