Authored by Justin R. Miller

auto-change tint color on point annotations

... ... @@ -36,6 +36,7 @@
#import "RMShape.h"
#import "RMAnnotation.h"
#import "RMQuadTree.h"
#import "RMPointAnnotation.h"
#import "RMFractalTileProjection.h"
... ... @@ -2669,6 +2670,18 @@
}
}
for (RMAnnotation *annotation in self.annotations)
{
if ([annotation isKindOfClass:[RMPointAnnotation class]] && annotation.isAnnotationVisibleOnScreen)
{
[annotation.layer removeFromSuperlayer];
annotation.layer = nil;
[_overlayView addSublayer:annotation.layer];
}
}
[self correctPositionOfAllAnnotations];
if (_currentCallout)
_currentCallout.tintColor = self.tintColor;
}
... ...
... ... @@ -29,6 +29,7 @@
#import "RMPointAnnotation.h"
#import "RMMarker.h"
#import "RMMapView.h"
@implementation RMPointAnnotation
... ... @@ -44,7 +45,7 @@
{
if ( ! [super layer])
{
RMMarker *marker = [[RMMarker alloc] initWithMapBoxMarkerImage];
RMMarker *marker = [[RMMarker alloc] initWithMapBoxMarkerImage:nil tintColor:(RMPostVersion7 ? self.mapView.tintColor : nil)];
marker.canShowCallout = YES;
... ...