summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLloyd Sheng <i@lloydsheng.com>2018-03-02 17:05:23 +0800
committerLloyd Sheng <i@lloydsheng.com>2018-03-02 17:05:23 +0800
commit240b53ee5f2b813c35ee8795801811ddc7da468b (patch)
tree250b3831d6322c650adad6d98f8fe1627d4e22f4
parent48744d51d8f460de3dc32ad4ef3e0ee12f80a149 (diff)
downloadqtlocation-mapboxgl-upstream/lloyd-annotation-enqueue.tar.gz
[ios] Fix annotation view not fully cleanup before enequqeupstream/lloyd-annotation-enqueue
-rw-r--r--platform/ios/src/MGLMapView.mm2
1 files changed, 2 insertions, 0 deletions
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])
{