summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLOpenGLStyleLayer.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLOpenGLStyleLayer.mm')
-rw-r--r--platform/darwin/src/MGLOpenGLStyleLayer.mm13
1 files changed, 11 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.mm b/platform/darwin/src/MGLOpenGLStyleLayer.mm
index c72b844447..f109ea85b0 100644
--- a/platform/darwin/src/MGLOpenGLStyleLayer.mm
+++ b/platform/darwin/src/MGLOpenGLStyleLayer.mm
@@ -2,6 +2,7 @@
#import "MGLMapView_Private.h"
#import "MGLStyle_Private.h"
+#import "MGLStyleLayer_Private.h"
#include <mbgl/style/layers/custom_layer.hpp>
#include <mbgl/math/wrap.hpp>
@@ -96,11 +97,19 @@ void MGLFinishCustomStyleLayer(void *context) {
MGLFinishCustomStyleLayer,
(__bridge void *)self);
_pendingLayer = std::move(layer);
- _rawLayer = _pendingLayer.get();
+ self.rawLayer = _pendingLayer.get();
}
return self;
}
+- (mbgl::style::CustomLayer *)rawLayer {
+ return (mbgl::style::CustomLayer *)super.rawLayer;
+}
+
+- (void)setRawLayer:(mbgl::style::CustomLayer *)rawLayer {
+ super.rawLayer = rawLayer;
+}
+
#pragma mark - Adding to and removing from a map view
- (void)setMapView:(MGLMapView *)mapView {
@@ -130,7 +139,7 @@ void MGLFinishCustomStyleLayer(void *context) {
return;
}
_pendingLayer = std::move(reinterpret_cast<std::unique_ptr<mbgl::style::CustomLayer> &>(removedLayer));
- _rawLayer = _pendingLayer.get();
+ self.rawLayer = _pendingLayer.get();
}
/**