我想在mapkit中添加有向箭头折线。如何实现图像效果?
- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id<MKOverlay>)overlay
{
MKOverlayRenderer *overlayRender = nil;
MKPolylineRenderer *routeLineRender = [[MKPolylineRenderer alloc] initWithPolyline:overlay];
routeLineRender.fillColor = RGB(134, 183, 98);
routeLineRender.strokeColor = RGB(134, 183, 98);
routeLineRender.lineWidth = 3;
overlayRender = routeLineRender;
return overlayRender;
}
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay
{
MKOverlayView *overlayView = nil;
MKPolylineView *routeLineView = [[MKPolylineView alloc] initWithPolyline:overlay];
routeLineView.strokeColor = RGB(134, 183, 98);
routeLineView.fillColor = RGB(134, 183, 98);
routeLineView.lineWidth = 3;
overlayView = routeLineView;
return overlayView;
}