summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2019-04-02 09:41:34 -0400
committerJulian Rex <julian.rex@mapbox.com>2019-04-02 09:41:34 -0400
commit570a2d03446a006044c1be00b4f8bcc239b554c8 (patch)
tree8862aa31e7d371097799422477e8fb4da424a959
parent8a31df31c9ecc06c055747807806328ae84d643e (diff)
downloadqtlocation-mapboxgl-upstream/jrex/14232-work-around.tar.gz
Re-add annotation views.upstream/jrex/14232-work-around
-rw-r--r--platform/ios/src/MGLMapView.mm11
1 files changed, 10 insertions, 1 deletions
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) {