diff options
Diffstat (limited to 'src/mbgl/style/layers/line_layer.cpp')
-rw-r--r-- | src/mbgl/style/layers/line_layer.cpp | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp index f5354e2bdb..f9fc058ed7 100644 --- a/src/mbgl/style/layers/line_layer.cpp +++ b/src/mbgl/style/layers/line_layer.cpp @@ -43,62 +43,6 @@ void LineLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer> layout.stringify(writer); } -// Source - -const std::string& LineLayer::getSourceID() const { - return impl().source; -} - -void LineLayer::setSourceLayer(const std::string& sourceLayer) { - auto impl_ = mutableImpl(); - impl_->sourceLayer = sourceLayer; - baseImpl = std::move(impl_); -} - -const std::string& LineLayer::getSourceLayer() const { - return impl().sourceLayer; -} - -// Filter - -void LineLayer::setFilter(const Filter& filter) { - auto impl_ = mutableImpl(); - impl_->filter = filter; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - -const Filter& LineLayer::getFilter() const { - return impl().filter; -} - -// Visibility - -void LineLayer::setVisibility(VisibilityType value) { - if (value == getVisibility()) - return; - auto impl_ = mutableImpl(); - impl_->visibility = value; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - -// Zoom range - -void LineLayer::setMinZoom(float minZoom) { - auto impl_ = mutableImpl(); - impl_->minZoom = minZoom; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - -void LineLayer::setMaxZoom(float maxZoom) { - auto impl_ = mutableImpl(); - impl_->maxZoom = maxZoom; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - // Layout properties PropertyValue<LineCapType> LineLayer::getDefaultLineCap() { @@ -880,5 +824,9 @@ optional<Error> LineLayer::setLayoutProperty(const std::string& name, const Conv return Error { "layer doesn't support this property" }; } +Mutable<Layer::Impl> LineLayer::mutableBaseImpl() const { + return staticMutableCast<Layer::Impl>(mutableImpl()); +} + } // namespace style } // namespace mbgl |