Reputation: 1237
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:
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:
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?
Upvotes: 1
Views: 174
Reputation: 1237
Incase you are looking for an answer to this I used to approach here:
Adding the object as an RMShape instead, stopped my drawing issues.
Upvotes: 1