From 505f1a792f07161994ba6744dbf0340ab846c617 Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Tue, 8 Nov 2016 08:59:16 -0800 Subject: [PATCH] [ios, macos] Use the rawLayer pointer to access the mbgl layer A previous refactor neglected to remove the unused `layer` property. This removes that property and uses the rawLayer property that actually points to the mbgl layer. --- platform/darwin/src/MGLStyleLayer.mm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/platform/darwin/src/MGLStyleLayer.mm b/platform/darwin/src/MGLStyleLayer.mm index 293aa54f308..7f29041f801 100644 --- a/platform/darwin/src/MGLStyleLayer.mm +++ b/platform/darwin/src/MGLStyleLayer.mm @@ -5,8 +5,6 @@ @interface MGLStyleLayer () -@property (nonatomic) mbgl::style::Layer *layer; - @end @implementation MGLStyleLayer @@ -24,33 +22,33 @@ - (void)setVisible:(BOOL)visible mbgl::style::VisibilityType v = visible ? mbgl::style::VisibilityType::Visible : mbgl::style::VisibilityType::None; - self.layer->setVisibility(v); + self.rawLayer->setVisibility(v); } - (BOOL)isVisible { - mbgl::style::VisibilityType v = self.layer->getVisibility(); + mbgl::style::VisibilityType v = self.rawLayer->getVisibility(); return (v == mbgl::style::VisibilityType::Visible); } - (void)setMaximumZoomLevel:(float)maximumZoomLevel { - self.layer->setMaxZoom(maximumZoomLevel); + self.rawLayer->setMaxZoom(maximumZoomLevel); } - (float)maximumZoomLevel { - return self.layer->getMaxZoom(); + return self.rawLayer->getMaxZoom(); } - (void)setMinimumZoomLevel:(float)minimumZoomLevel { - self.layer->setMinZoom(minimumZoomLevel); + self.rawLayer->setMinZoom(minimumZoomLevel); } - (float)minimumZoomLevel { - return self.layer->getMinZoom(); + return self.rawLayer->getMinZoom(); } @end