From 240b53ee5f2b813c35ee8795801811ddc7da468b Mon Sep 17 00:00:00 2001 From: Lloyd Sheng Date: Fri, 2 Mar 2018 17:05:23 +0800 Subject: [ios] Fix annotation view not fully cleanup before enequqe --- platform/ios/src/MGLMapView.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index cad14343a8..6161c70f6e 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -5770,6 +5770,8 @@ public: if (annotationContext.viewReuseIdentifier) { annotationView.annotation = nil; + [annotationView removeFromSuperview]; + [self.annotationContainerView.annotationViews removeObject:annotationView]; NSMutableArray *annotationViewReuseQueue = [self annotationViewReuseQueueForIdentifier:annotationContext.viewReuseIdentifier]; if (![annotationViewReuseQueue containsObject:annotationView]) { -- cgit v1.2.1