diff options
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 8872261a88..2333df5c9a 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3068,7 +3068,7 @@ public: return annotationContext.annotation; } -/// Returns the annotation tag assigned to the given annotation. Relatively expensive. +/// Returns the annotation tag assigned to the given annotation. - (MGLAnnotationTag)annotationTagForAnnotation:(id <MGLAnnotation>)annotation { if ( ! annotation || annotation == self.userLocation @@ -3108,7 +3108,7 @@ public: NSAssert([annotation conformsToProtocol:@protocol(MGLAnnotation)], @"annotation should conform to MGLAnnotation"); // adding the same annotation object twice is a no-op - if ([self.annotations containsObject:annotation]) + if (_annotationTagsByAnnotation.count(annotation) != 0) { continue; } |