From 570a2d03446a006044c1be00b4f8bcc239b554c8 Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Tue, 2 Apr 2019 09:41:34 -0400 Subject: Re-add annotation views. --- platform/ios/src/MGLMapView.mm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index cc5f98c0eb..83c75909bd 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1266,6 +1266,8 @@ public: // Just performing a sleepGL/wakeGL pair isn't sufficient - in this case // we can still get errors when calling bindDrawable. Here we completely // recreate the GLKView + + [self.userLocationAnnotationView removeFromSuperview]; [_glView removeFromSuperview]; _glView = [[GLKView alloc] initWithFrame:self.bounds context:_context]; @@ -1276,10 +1278,17 @@ public: _glView.contentScaleFactor = [UIScreen instancesRespondToSelector:@selector(nativeScale)] ? [[UIScreen mainScreen] nativeScale] : [[UIScreen mainScreen] scale]; _glView.layer.opaque = _opaque; _glView.delegate = self; - + [self insertSubview:_glView atIndex:0]; _glView.contentMode = UIViewContentModeCenter; + if (self.annotationContainerView) + { + [_glView insertSubview:self.annotationContainerView atIndex:0]; + } + + [self updateUserLocationAnnotationView]; + // Do not bind...yet if (self.window) { -- cgit v1.2.1