summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/fill_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/fill_layer.cpp
parentc4e4cc5081965d03132eea754c27ece3c95961cb (diff)
downloadqtlocation-mapboxgl-16c435b1517b15a5ea8654987979ef58800b838b.tar.gz
[core, node] Implement bindings for addLayer
Diffstat (limited to 'src/mbgl/style/layers/fill_layer.cpp')
-rw-r--r--src/mbgl/style/layers/fill_layer.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp
index 7d7d1a9e27..44894aff33 100644
--- a/src/mbgl/style/layers/fill_layer.cpp
+++ b/src/mbgl/style/layers/fill_layer.cpp
@@ -24,6 +24,14 @@ std::unique_ptr<Layer> FillLayer::Impl::clone() const {
return std::make_unique<FillLayer>(*this);
}
+std::unique_ptr<Layer> FillLayer::Impl::cloneRef(const std::string& id_) const {
+ auto result = std::make_unique<FillLayer>(*this);
+ result->impl->id = id_;
+ result->impl->ref = this->id;
+ result->impl->paint = FillPaintProperties();
+ return std::move(result);
+}
+
// Source
const std::string& FillLayer::getSourceID() const {
@@ -57,56 +65,56 @@ PropertyValue<bool> FillLayer::getFillAntialias() const {
return impl->paint.fillAntialias.get();
}
-void FillLayer::setFillAntialias(PropertyValue<bool> value) {
- impl->paint.fillAntialias.set(value);
+void FillLayer::setFillAntialias(PropertyValue<bool> value, const optional<std::string>& klass) {
+ impl->paint.fillAntialias.set(value, klass);
}
PropertyValue<float> FillLayer::getFillOpacity() const {
return impl->paint.fillOpacity.get();
}
-void FillLayer::setFillOpacity(PropertyValue<float> value) {
- impl->paint.fillOpacity.set(value);
+void FillLayer::setFillOpacity(PropertyValue<float> value, const optional<std::string>& klass) {
+ impl->paint.fillOpacity.set(value, klass);
}
PropertyValue<Color> FillLayer::getFillColor() const {
return impl->paint.fillColor.get();
}
-void FillLayer::setFillColor(PropertyValue<Color> value) {
- impl->paint.fillColor.set(value);
+void FillLayer::setFillColor(PropertyValue<Color> value, const optional<std::string>& klass) {
+ impl->paint.fillColor.set(value, klass);
}
PropertyValue<Color> FillLayer::getFillOutlineColor() const {
return impl->paint.fillOutlineColor.get();
}
-void FillLayer::setFillOutlineColor(PropertyValue<Color> value) {
- impl->paint.fillOutlineColor.set(value);
+void FillLayer::setFillOutlineColor(PropertyValue<Color> value, const optional<std::string>& klass) {
+ impl->paint.fillOutlineColor.set(value, klass);
}
PropertyValue<std::array<float, 2>> FillLayer::getFillTranslate() const {
return impl->paint.fillTranslate.get();
}
-void FillLayer::setFillTranslate(PropertyValue<std::array<float, 2>> value) {
- impl->paint.fillTranslate.set(value);
+void FillLayer::setFillTranslate(PropertyValue<std::array<float, 2>> value, const optional<std::string>& klass) {
+ impl->paint.fillTranslate.set(value, klass);
}
PropertyValue<TranslateAnchorType> FillLayer::getFillTranslateAnchor() const {
return impl->paint.fillTranslateAnchor.get();
}
-void FillLayer::setFillTranslateAnchor(PropertyValue<TranslateAnchorType> value) {
- impl->paint.fillTranslateAnchor.set(value);
+void FillLayer::setFillTranslateAnchor(PropertyValue<TranslateAnchorType> value, const optional<std::string>& klass) {
+ impl->paint.fillTranslateAnchor.set(value, klass);
}
PropertyValue<std::string> FillLayer::getFillPattern() const {
return impl->paint.fillPattern.get();
}
-void FillLayer::setFillPattern(PropertyValue<std::string> value) {
- impl->paint.fillPattern.set(value);
+void FillLayer::setFillPattern(PropertyValue<std::string> value, const optional<std::string>& klass) {
+ impl->paint.fillPattern.set(value, klass);
}
} // namespace style