I am making a navigation application by drawing a direction between two points. I am successfully archiving functionality.
But the direction line is drawn over the road mark and this mark cannot be read as shown in the figure below.

this is my overlay code
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay
{
MKPolylineView *overlayView = [[MKPolylineView alloc] initWithPolyline:overlay];
overlayView.lineWidth = 10.0f;
overlayView.strokeColor = [UIColor redColor];
return overlayView;
}
I can overcome this with a transparent string, but this is not an efficient way.
The best way is to draw a line between the map layer and the MKMapView label layer, but I don't know how to do this.
So please help. Thanks.
source
share