Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 9d36092

Browse files
committed
[ios] Remove annotation view from container view when annotation removed
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.
1 parent 30b9191 commit 9d36092

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

platform/ios/src/MGLMapView.mm

+1
Original file line numberDiff line numberDiff line change
@@ -3501,6 +3501,7 @@ - (void)removeAnnotations:(NS_ARRAY_OF(id <MGLAnnotation>) *)annotations
35013501

35023502
annotationView.annotation = nil;
35033503
[annotationView removeFromSuperview];
3504+
[self.annotationContainerView.annotationViews removeObject:annotationView];
35043505

35053506
if (annotationTag == _selectedAnnotationTag)
35063507
{

0 commit comments

Comments
 (0)