diff options
Diffstat (limited to 'src/mbgl/style/layers/hillshade_layer.cpp')
-rw-r--r-- | src/mbgl/style/layers/hillshade_layer.cpp | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/src/mbgl/style/layers/hillshade_layer.cpp b/src/mbgl/style/layers/hillshade_layer.cpp index aed49f6441..badc9ef30f 100644 --- a/src/mbgl/style/layers/hillshade_layer.cpp +++ b/src/mbgl/style/layers/hillshade_layer.cpp @@ -42,40 +42,6 @@ std::unique_ptr<Layer> HillshadeLayer::cloneRef(const std::string& id_) const { void HillshadeLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const { } -// Source - -const std::string& HillshadeLayer::getSourceID() const { - return impl().source; -} - - -// Visibility - -void HillshadeLayer::setVisibility(VisibilityType value) { - if (value == getVisibility()) - return; - auto impl_ = mutableImpl(); - impl_->visibility = value; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - -// Zoom range - -void HillshadeLayer::setMinZoom(float minZoom) { - auto impl_ = mutableImpl(); - impl_->minZoom = minZoom; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - -void HillshadeLayer::setMaxZoom(float maxZoom) { - auto impl_ = mutableImpl(); - impl_->maxZoom = maxZoom; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - // Layout properties @@ -451,5 +417,9 @@ optional<Error> HillshadeLayer::setLayoutProperty(const std::string& name, const return Error { "layer doesn't support this property" }; } +Mutable<Layer::Impl> HillshadeLayer::mutableBaseImpl() const { + return staticMutableCast<Layer::Impl>(mutableImpl()); +} + } // namespace style } // namespace mbgl |