summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.mm
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2017-05-19 11:27:46 -0700
committerGitHub <noreply@github.com>2017-05-19 11:27:46 -0700
commitb9d3ccc99506efcadd90bc6b1fc4b9831dfd32df (patch)
treecb8fe4839b266dfa7f89ec34a6ad93336c7d88a6 /platform/ios/src/MGLMapView.mm
parent554b1cf3e2c8ba21fd3e2259d04915811668a3ac (diff)
downloadqtlocation-mapboxgl-b9d3ccc99506efcadd90bc6b1fc4b9831dfd32df.tar.gz
[ios] Remove annotation view from container view when annotation removed (#9025)
The annotation container view keeps an array of annotation views that is separate from the array of subviews that is a property of the UIView parent class. This removes an annotation view from that container view array when the associated annotation is removed. This avoids issue related to previously removed annotation views continuing to be involved in map view logic around annotation view selection due to taps.
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r--platform/ios/src/MGLMapView.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 5acb600797..720c1d506a 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -3492,6 +3492,7 @@ public:
annotationView.annotation = nil;
[annotationView removeFromSuperview];
+ [self.annotationContainerView.annotationViews removeObject:annotationView];
if (annotationTag == _selectedAnnotationTag)
{