summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/background_layer.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-22 16:28:21 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-24 09:39:51 -0700
commit16c435b1517b15a5ea8654987979ef58800b838b (patch)
tree8f81c4e202e1337d0966a06f27842d45a113fded /src/mbgl/style/layers/background_layer.cpp
parentc4e4cc5081965d03132eea754c27ece3c95961cb (diff)
downloadqtlocation-mapboxgl-16c435b1517b15a5ea8654987979ef58800b838b.tar.gz
[core, node] Implement bindings for addLayer
Diffstat (limited to 'src/mbgl/style/layers/background_layer.cpp')
-rw-r--r--src/mbgl/style/layers/background_layer.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp
index aeb4067503..42cd76d01f 100644
--- a/src/mbgl/style/layers/background_layer.cpp
+++ b/src/mbgl/style/layers/background_layer.cpp
@@ -23,6 +23,14 @@ std::unique_ptr<Layer> BackgroundLayer::Impl::clone() const {
return std::make_unique<BackgroundLayer>(*this);
}
+std::unique_ptr<Layer> BackgroundLayer::Impl::cloneRef(const std::string& id_) const {
+ auto result = std::make_unique<BackgroundLayer>(*this);
+ result->impl->id = id_;
+ result->impl->ref = this->id;
+ result->impl->paint = BackgroundPaintProperties();
+ return std::move(result);
+}
+
// Layout properties
@@ -33,24 +41,24 @@ PropertyValue<Color> BackgroundLayer::getBackgroundColor() const {
return impl->paint.backgroundColor.get();
}
-void BackgroundLayer::setBackgroundColor(PropertyValue<Color> value) {
- impl->paint.backgroundColor.set(value);
+void BackgroundLayer::setBackgroundColor(PropertyValue<Color> value, const optional<std::string>& klass) {
+ impl->paint.backgroundColor.set(value, klass);
}
PropertyValue<std::string> BackgroundLayer::getBackgroundPattern() const {
return impl->paint.backgroundPattern.get();
}
-void BackgroundLayer::setBackgroundPattern(PropertyValue<std::string> value) {
- impl->paint.backgroundPattern.set(value);
+void BackgroundLayer::setBackgroundPattern(PropertyValue<std::string> value, const optional<std::string>& klass) {
+ impl->paint.backgroundPattern.set(value, klass);
}
PropertyValue<float> BackgroundLayer::getBackgroundOpacity() const {
return impl->paint.backgroundOpacity.get();
}
-void BackgroundLayer::setBackgroundOpacity(PropertyValue<float> value) {
- impl->paint.backgroundOpacity.set(value);
+void BackgroundLayer::setBackgroundOpacity(PropertyValue<float> value, const optional<std::string>& klass) {
+ impl->paint.backgroundOpacity.set(value, klass);
}
} // namespace style