summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers
diff options
context:
space:
mode:
authorLauren Budorick <lauren@mapbox.com>2017-06-19 14:27:43 -0700
committerGitHub <noreply@github.com>2017-06-19 14:27:43 -0700
commit87a70c47930d79017816b8ac7ae1bb06eb6446c9 (patch)
tree721d9c995573d1f7ce755a75f64aa088eb43a3c2 /src/mbgl/style/layers
parenta33cad98557f2d15bfb578e4795b130d25a2def2 (diff)
downloadqtlocation-mapboxgl-87a70c47930d79017816b8ac7ae1bb06eb6446c9.tar.gz
[core] Enable property functions for line-width (#9250)
Diffstat (limited to 'src/mbgl/style/layers')
-rw-r--r--src/mbgl/style/layers/line_layer.cpp6
-rw-r--r--src/mbgl/style/layers/line_layer_properties.hpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp
index cf3f81f613..6fbdf19568 100644
--- a/src/mbgl/style/layers/line_layer.cpp
+++ b/src/mbgl/style/layers/line_layer.cpp
@@ -267,15 +267,15 @@ TransitionOptions LineLayer::getLineTranslateAnchorTransition() const {
return impl().paint.template get<LineTranslateAnchor>().options;
}
-PropertyValue<float> LineLayer::getDefaultLineWidth() {
+DataDrivenPropertyValue<float> LineLayer::getDefaultLineWidth() {
return { 1 };
}
-PropertyValue<float> LineLayer::getLineWidth() const {
+DataDrivenPropertyValue<float> LineLayer::getLineWidth() const {
return impl().paint.template get<LineWidth>().value;
}
-void LineLayer::setLineWidth(PropertyValue<float> value) {
+void LineLayer::setLineWidth(DataDrivenPropertyValue<float> value) {
if (value == getLineWidth())
return;
auto impl_ = mutableImpl();
diff --git a/src/mbgl/style/layers/line_layer_properties.hpp b/src/mbgl/style/layers/line_layer_properties.hpp
index 7930ed113b..b2c7f3199c 100644
--- a/src/mbgl/style/layers/line_layer_properties.hpp
+++ b/src/mbgl/style/layers/line_layer_properties.hpp
@@ -48,7 +48,7 @@ struct LineTranslateAnchor : PaintProperty<TranslateAnchorType> {
static TranslateAnchorType defaultValue() { return TranslateAnchorType::Map; }
};
-struct LineWidth : PaintProperty<float> {
+struct LineWidth : DataDrivenPaintProperty<float, attributes::a_width, uniforms::u_width> {
static float defaultValue() { return 1; }
};