From 5e65d8109a3716ef028a33a755be5ed2bf0e6959 Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Tue, 8 Nov 2016 13:32:58 -0800 Subject: [PATCH] [ios, macos] Use the rawLayer pointer to access the mbgl layer (#6966) 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 293aa54f3..7f29041f8 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 @@ 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