diff options
Diffstat (limited to 'platform/macos/app/MapDocument.m')
-rw-r--r-- | platform/macos/app/MapDocument.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m index 7d39f93347..b82f36748a 100644 --- a/platform/macos/app/MapDocument.m +++ b/platform/macos/app/MapDocument.m @@ -563,6 +563,12 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio _isShowingAnimatedAnnotation = NO; } +- (IBAction)showVisibleAnnotationCount:(id)sender { + NSArray *visibleAnnotations = self.mapView.visibleAnnotations; + NSLog(@"Number of visible annotations = %ld", visibleAnnotations.count); +} + + - (IBAction)startWorldTour:(id)sender { _isTouringWorld = YES; @@ -1123,6 +1129,9 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio if (menuItem.action == @selector(insertGraticuleLayer:)) { return ![self.mapView.style sourceWithIdentifier:@"graticule"]; } + if (menuItem.action == @selector(showVisibleAnnotationCount:)) { + return YES; + } if (menuItem.action == @selector(showAllAnnotations:) || menuItem.action == @selector(removeAllAnnotations:)) { return self.mapView.annotations.count > 0; } |