I'm trying to draw a good one MKPolylineon MKPolylineView. Everything is going well so far - the polyline draws the way I want, and when I want it to use the following code:
[[self map] addOverlay:routeLine];
And this method to tell the application how to draw it:
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay {
MKOverlayView* overlayView = nil;
self.routeLineView = [[MKPolylineView alloc] initWithPolyline:[self routeLine]];
[[self routeLineView] setFillColor:[UIColor colorWithRed:167/255.0f green:210/255.0f blue:244/255.0f alpha:1.0]];
[[self routeLineView] setStrokeColor:[UIColor colorWithRed:0/255.0f green:136/255.0f blue:255/255.0f alpha:1.0]];
[[self routeLineView] setLineWidth:15.0];
[[self routeLineView] setLineCap:kCGLineCapRound];
overlayView = [self routeLineView];
return overlayView;
}
As a result, I get a line with a blue color. Blue, I see, however, is not the fill color with the measure that I expect - it is the blue color of the stroke. When I use this method, the fill color is missing. Why doesn't he paint the fill color on the polyline?
After exploring further, I found this tidbit of information in the Xcode quick reference section:
MKPolylineView MKPolyline. , . ( , .) , , MKOverlayPathView.
. , ? , , . , , , - / . MKOverlayPathView ( ?), , . - , ?