Open maciekish opened 9 years ago
I'm having this problem too.
The way i work around it is i create subclass for RMPolylineAnnotation, RMPolygonAnnotation and RMCircleAnnotation.
They both implemented a function called -(BOOL)isAXAnnotation; Then modify RMMapView.m : 3024, 3080 so that annotation.layer doesn't get released. (the line between willHideLayerForAnnotation and didHideLayerForAnnotation.
if ([annotation respondsToSelector:@selector(isAXAnnotation)]) {
} else {
annotation.layer = nil;
}
The only problem is that it could cause a high memory usage for every annotation.layer you have.
We have 100-200 subclassed
RMPolygonAnnotations
on our map. These have a couple properties set on the layer when they are instantiated:Quite often when moving the map around some annotations seem to lose their RMShape layer properties and get a black outline instead of the one i have set. This also happens every time when changing visible tile sets on the map. Layer gets released and recreated or something and the properties get lost perhaps?
Example: http://s.swic.name/bBMp