Вопрос

I have added an RMPolylineAnnotation to my rmMapView as follows in xcode:

RMPolylineAnnotation *polylineAnnotation = [[RMPolylineAnnotation alloc] initWithMapView:rmMapView points:aPoints];
[polylineAnnotation setLineWidth:5.0f];
[polylineAnnotation setLineColor:[UIColor orangeColor]];
[polylineAnnotation setTitle:@"route"];

[rmMapView addAnnotation:polylineAnnotation];

This is drawing successfully when I load up my map:

enter image description here

However, if I pan until the route is off the screen, then pan back again it redraws the line without the parameters I've set:

enter image description here

As you can see I've tried setting the name to 'route' so that I can identify it within - (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMAnnotation *)annotation but the layer is never redrawn, the circles are though even though they are added in exactly the same way. Does anyone know how I can stop this from happening?

Это было полезно?

Решение

Incase you are looking for an answer to this I used to approach here:

iOS MapBox RMShape

Adding the object as an RMShape instead, stopped my drawing issues.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top