From 49ee543e729d54c14b2f938803a92e082448ea44 Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Wed, 16 Jan 2019 17:31:59 -0500 Subject: [PATCH] [macos] Fixes MGLMapView.visibleAnnotations (#13745) --- platform/macos/CHANGELOG.md | 1 + platform/macos/src/MGLMapView.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 28ff0fc45..fab8e972f 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -5,6 +5,7 @@ * Added an `MGLStyle.performsPlacementTransitions` property to control how long it takes for colliding labels to fade out. ([#13565](https://github.com/mapbox/mapbox-gl-native/pull/13565)) * Fixed a crash when casting large numbers in `NSExpression`. ([#13580](https://github.com/mapbox/mapbox-gl-native/pull/13580)) * Added the `-[MGLShapeSource leavesOfCluster:offset:limit:]`, `-[MGLShapeSource childrenOfCluster:]`, `-[MGLShapeSource zoomLevelForExpandingCluster:]` methods for inspecting a cluster in an `MGLShapeSource`s created with the `MGLShapeSourceOptionClustered` option. Feature querying now returns clusters represented by `MGLPointFeatureCluster` objects (that conform to the `MGLCluster` protocol). ([#12952](https://github.com/mapbox/mapbox-gl-native/pull/12952) +* Fixed a bug with `MGLMapView.visibleAnnotations` that resulted in incorrect results and performance degradation. ([#13745](https://github.com/mapbox/mapbox-gl-native/pull/13745)) ## 0.13.0 - December 20, 2018 diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 0a07c9e05..a5779aa60 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1845,7 +1845,7 @@ public: - (nullable NSArray> *)visibleAnnotations { - return [self visibleFeaturesInRect:self.bounds]; + return [self visibleAnnotationsInRect:self.bounds]; } - (nullable NSArray> *)visibleAnnotationsInRect:(CGRect)rect