I had an application in which i am showing polylines in mkmapkit like this -
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;
}
Now i want to add an arrow over that polylines to show the direction like this
How to draw an arrow on every polyline segment on Google Maps V3
. I googled for the same but no luck so far. Can anybody direct me on how to achieve this?