summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-07-31 14:21:47 -0700
committerGitHub <noreply@github.com>2018-07-31 14:21:47 -0700
commit9bdd765a02de75851a00ab85223d5d582a104757 (patch)
treebcb417a47808a4a94c171b083c7f2e2cce457107 /src/mbgl/style
parent885f6e3c02138398d094e49243817a83349b4d50 (diff)
downloadqtlocation-mapboxgl-9bdd765a02de75851a00ab85223d5d582a104757.tar.gz
[core] Merge DataDrivenPropertyValue into PropertyValue (#12513)
Diffstat (limited to 'src/mbgl/style')
-rw-r--r--src/mbgl/style/conversion/color_ramp_property_value.cpp2
-rw-r--r--src/mbgl/style/conversion/light.cpp8
-rw-r--r--src/mbgl/style/conversion/make_property_setters.hpp224
-rw-r--r--src/mbgl/style/conversion/make_property_setters.hpp.ejs4
-rw-r--r--src/mbgl/style/conversion/property_setter.hpp5
-rw-r--r--src/mbgl/style/conversion/stringify.hpp14
-rw-r--r--src/mbgl/style/layers/circle_layer.cpp42
-rw-r--r--src/mbgl/style/layers/fill_extrusion_layer.cpp18
-rw-r--r--src/mbgl/style/layers/fill_layer.cpp18
-rw-r--r--src/mbgl/style/layers/heatmap_layer.cpp12
-rw-r--r--src/mbgl/style/layers/line_layer.cpp42
-rw-r--r--src/mbgl/style/layers/symbol_layer.cpp150
-rw-r--r--src/mbgl/style/layout_property.hpp3
-rw-r--r--src/mbgl/style/paint_property.hpp7
14 files changed, 266 insertions, 283 deletions
diff --git a/src/mbgl/style/conversion/color_ramp_property_value.cpp b/src/mbgl/style/conversion/color_ramp_property_value.cpp
index e792cf3fe4..f29438b6a2 100644
--- a/src/mbgl/style/conversion/color_ramp_property_value.cpp
+++ b/src/mbgl/style/conversion/color_ramp_property_value.cpp
@@ -10,7 +10,7 @@ namespace mbgl {
namespace style {
namespace conversion {
-optional<ColorRampPropertyValue> Converter<ColorRampPropertyValue>::operator()(const Convertible& value, Error& error, bool) const {
+optional<ColorRampPropertyValue> Converter<ColorRampPropertyValue>::operator()(const Convertible& value, Error& error, bool, bool) const {
using namespace mbgl::style::expression;
if (isUndefined(value)) {
return ColorRampPropertyValue();
diff --git a/src/mbgl/style/conversion/light.cpp b/src/mbgl/style/conversion/light.cpp
index 0a68f2396f..7b96c89a1c 100644
--- a/src/mbgl/style/conversion/light.cpp
+++ b/src/mbgl/style/conversion/light.cpp
@@ -18,7 +18,7 @@ optional<Light> Converter<Light>::operator()(const Convertible& value, Error& er
const auto anchor = objectMember(value, "anchor");
if (anchor) {
optional<PropertyValue<LightAnchorType>> convertedAnchor =
- convert<PropertyValue<LightAnchorType>>(*anchor, error, false);
+ convert<PropertyValue<LightAnchorType>>(*anchor, error, false, false);
if (convertedAnchor) {
light.setAnchor(*convertedAnchor);
@@ -41,7 +41,7 @@ optional<Light> Converter<Light>::operator()(const Convertible& value, Error& er
const auto color = objectMember(value, "color");
if (color) {
optional<PropertyValue<Color>> convertedColor =
- convert<PropertyValue<Color>>(*color, error, false);
+ convert<PropertyValue<Color>>(*color, error, false, false);
if (convertedColor) {
light.setColor(*convertedColor);
@@ -64,7 +64,7 @@ optional<Light> Converter<Light>::operator()(const Convertible& value, Error& er
const auto position = objectMember(value, "position");
if (position) {
optional<PropertyValue<Position>> convertedPosition =
- convert<PropertyValue<Position>>(*position, error, false);
+ convert<PropertyValue<Position>>(*position, error, false, false);
if (convertedPosition) {
light.setPosition(*convertedPosition);
@@ -87,7 +87,7 @@ optional<Light> Converter<Light>::operator()(const Convertible& value, Error& er
const auto intensity = objectMember(value, "intensity");
if (intensity) {
optional<PropertyValue<float>> convertedIntensity =
- convert<PropertyValue<float>>(*intensity, error, false);
+ convert<PropertyValue<float>>(*intensity, error, false, false);
if (convertedIntensity) {
light.setIntensity(*convertedIntensity);
diff --git a/src/mbgl/style/conversion/make_property_setters.hpp b/src/mbgl/style/conversion/make_property_setters.hpp
index 64826106f0..ada0d53002 100644
--- a/src/mbgl/style/conversion/make_property_setters.hpp
+++ b/src/mbgl/style/conversion/make_property_setters.hpp
@@ -26,47 +26,47 @@ inline auto makeLayoutPropertySetters() {
result["visibility"] = &setVisibility;
- result["line-cap"] = &setProperty<LineLayer, PropertyValue<LineCapType>, &LineLayer::setLineCap>;
- result["line-join"] = &setProperty<LineLayer, DataDrivenPropertyValue<LineJoinType>, &LineLayer::setLineJoin>;
- result["line-miter-limit"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineMiterLimit>;
- result["line-round-limit"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineRoundLimit>;
-
- result["symbol-placement"] = &setProperty<SymbolLayer, PropertyValue<SymbolPlacementType>, &SymbolLayer::setSymbolPlacement>;
- result["symbol-spacing"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setSymbolSpacing>;
- result["symbol-avoid-edges"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setSymbolAvoidEdges>;
- result["icon-allow-overlap"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconAllowOverlap>;
- result["icon-ignore-placement"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconIgnorePlacement>;
- result["icon-optional"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconOptional>;
- result["icon-rotation-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setIconRotationAlignment>;
- result["icon-size"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setIconSize>;
- result["icon-text-fit"] = &setProperty<SymbolLayer, PropertyValue<IconTextFitType>, &SymbolLayer::setIconTextFit>;
- result["icon-text-fit-padding"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 4>>, &SymbolLayer::setIconTextFitPadding>;
- result["icon-image"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<std::string>, &SymbolLayer::setIconImage, true>;
- result["icon-rotate"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setIconRotate>;
- result["icon-padding"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconPadding>;
- result["icon-keep-upright"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconKeepUpright>;
- result["icon-offset"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<std::array<float, 2>>, &SymbolLayer::setIconOffset>;
- result["icon-anchor"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<SymbolAnchorType>, &SymbolLayer::setIconAnchor>;
- result["icon-pitch-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setIconPitchAlignment>;
- result["text-pitch-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextPitchAlignment>;
- result["text-rotation-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextRotationAlignment>;
- result["text-field"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<std::string>, &SymbolLayer::setTextField, true>;
- result["text-font"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<std::vector<std::string>>, &SymbolLayer::setTextFont>;
- result["text-size"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextSize>;
- result["text-max-width"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextMaxWidth>;
- result["text-line-height"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextLineHeight>;
- result["text-letter-spacing"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextLetterSpacing>;
- result["text-justify"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<TextJustifyType>, &SymbolLayer::setTextJustify>;
- result["text-anchor"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<SymbolAnchorType>, &SymbolLayer::setTextAnchor>;
- result["text-max-angle"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextMaxAngle>;
- result["text-rotate"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextRotate>;
- result["text-padding"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextPadding>;
- result["text-keep-upright"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextKeepUpright>;
- result["text-transform"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<TextTransformType>, &SymbolLayer::setTextTransform>;
- result["text-offset"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<std::array<float, 2>>, &SymbolLayer::setTextOffset>;
- result["text-allow-overlap"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextAllowOverlap>;
- result["text-ignore-placement"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextIgnorePlacement>;
- result["text-optional"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextOptional>;
+ result["line-cap"] = &setProperty<LineLayer, PropertyValue<LineCapType>, &LineLayer::setLineCap, false, false>;
+ result["line-join"] = &setProperty<LineLayer, PropertyValue<LineJoinType>, &LineLayer::setLineJoin, true, false>;
+ result["line-miter-limit"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineMiterLimit, false, false>;
+ result["line-round-limit"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineRoundLimit, false, false>;
+
+ result["symbol-placement"] = &setProperty<SymbolLayer, PropertyValue<SymbolPlacementType>, &SymbolLayer::setSymbolPlacement, false, false>;
+ result["symbol-spacing"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setSymbolSpacing, false, false>;
+ result["symbol-avoid-edges"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setSymbolAvoidEdges, false, false>;
+ result["icon-allow-overlap"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconAllowOverlap, false, false>;
+ result["icon-ignore-placement"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconIgnorePlacement, false, false>;
+ result["icon-optional"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconOptional, false, false>;
+ result["icon-rotation-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setIconRotationAlignment, false, false>;
+ result["icon-size"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconSize, true, false>;
+ result["icon-text-fit"] = &setProperty<SymbolLayer, PropertyValue<IconTextFitType>, &SymbolLayer::setIconTextFit, false, false>;
+ result["icon-text-fit-padding"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 4>>, &SymbolLayer::setIconTextFitPadding, false, false>;
+ result["icon-image"] = &setProperty<SymbolLayer, PropertyValue<std::string>, &SymbolLayer::setIconImage, true, true>;
+ result["icon-rotate"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconRotate, true, false>;
+ result["icon-padding"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconPadding, false, false>;
+ result["icon-keep-upright"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconKeepUpright, false, false>;
+ result["icon-offset"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 2>>, &SymbolLayer::setIconOffset, true, false>;
+ result["icon-anchor"] = &setProperty<SymbolLayer, PropertyValue<SymbolAnchorType>, &SymbolLayer::setIconAnchor, true, false>;
+ result["icon-pitch-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setIconPitchAlignment, false, false>;
+ result["text-pitch-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextPitchAlignment, false, false>;
+ result["text-rotation-alignment"] = &setProperty<SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextRotationAlignment, false, false>;
+ result["text-field"] = &setProperty<SymbolLayer, PropertyValue<std::string>, &SymbolLayer::setTextField, true, true>;
+ result["text-font"] = &setProperty<SymbolLayer, PropertyValue<std::vector<std::string>>, &SymbolLayer::setTextFont, true, false>;
+ result["text-size"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextSize, true, false>;
+ result["text-max-width"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextMaxWidth, true, false>;
+ result["text-line-height"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextLineHeight, false, false>;
+ result["text-letter-spacing"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextLetterSpacing, true, false>;
+ result["text-justify"] = &setProperty<SymbolLayer, PropertyValue<TextJustifyType>, &SymbolLayer::setTextJustify, true, false>;
+ result["text-anchor"] = &setProperty<SymbolLayer, PropertyValue<SymbolAnchorType>, &SymbolLayer::setTextAnchor, true, false>;
+ result["text-max-angle"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextMaxAngle, false, false>;
+ result["text-rotate"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextRotate, true, false>;
+ result["text-padding"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextPadding, false, false>;
+ result["text-keep-upright"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextKeepUpright, false, false>;
+ result["text-transform"] = &setProperty<SymbolLayer, PropertyValue<TextTransformType>, &SymbolLayer::setTextTransform, true, false>;
+ result["text-offset"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 2>>, &SymbolLayer::setTextOffset, true, false>;
+ result["text-allow-overlap"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextAllowOverlap, false, false>;
+ result["text-ignore-placement"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextIgnorePlacement, false, false>;
+ result["text-optional"] = &setProperty<SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextOptional, false, false>;
@@ -80,155 +80,155 @@ inline auto makeLayoutPropertySetters() {
inline auto makePaintPropertySetters() {
std::unordered_map<std::string, PropertySetter> result;
- result["fill-antialias"] = &setProperty<FillLayer, PropertyValue<bool>, &FillLayer::setFillAntialias>;
+ result["fill-antialias"] = &setProperty<FillLayer, PropertyValue<bool>, &FillLayer::setFillAntialias, false, false>;
result["fill-antialias-transition"] = &setTransition<FillLayer, &FillLayer::setFillAntialiasTransition>;
- result["fill-opacity"] = &setProperty<FillLayer, DataDrivenPropertyValue<float>, &FillLayer::setFillOpacity>;
+ result["fill-opacity"] = &setProperty<FillLayer, PropertyValue<float>, &FillLayer::setFillOpacity, true, false>;
result["fill-opacity-transition"] = &setTransition<FillLayer, &FillLayer::setFillOpacityTransition>;
- result["fill-color"] = &setProperty<FillLayer, DataDrivenPropertyValue<Color>, &FillLayer::setFillColor>;
+ result["fill-color"] = &setProperty<FillLayer, PropertyValue<Color>, &FillLayer::setFillColor, true, false>;
result["fill-color-transition"] = &setTransition<FillLayer, &FillLayer::setFillColorTransition>;
- result["fill-outline-color"] = &setProperty<FillLayer, DataDrivenPropertyValue<Color>, &FillLayer::setFillOutlineColor>;
+ result["fill-outline-color"] = &setProperty<FillLayer, PropertyValue<Color>, &FillLayer::setFillOutlineColor, true, false>;
result["fill-outline-color-transition"] = &setTransition<FillLayer, &FillLayer::setFillOutlineColorTransition>;
- result["fill-translate"] = &setProperty<FillLayer, PropertyValue<std::array<float, 2>>, &FillLayer::setFillTranslate>;
+ result["fill-translate"] = &setProperty<FillLayer, PropertyValue<std::array<float, 2>>, &FillLayer::setFillTranslate, false, false>;
result["fill-translate-transition"] = &setTransition<FillLayer, &FillLayer::setFillTranslateTransition>;
- result["fill-translate-anchor"] = &setProperty<FillLayer, PropertyValue<TranslateAnchorType>, &FillLayer::setFillTranslateAnchor>;
+ result["fill-translate-anchor"] = &setProperty<FillLayer, PropertyValue<TranslateAnchorType>, &FillLayer::setFillTranslateAnchor, false, false>;
result["fill-translate-anchor-transition"] = &setTransition<FillLayer, &FillLayer::setFillTranslateAnchorTransition>;
- result["fill-pattern"] = &setProperty<FillLayer, PropertyValue<std::string>, &FillLayer::setFillPattern>;
+ result["fill-pattern"] = &setProperty<FillLayer, PropertyValue<std::string>, &FillLayer::setFillPattern, false, false>;
result["fill-pattern-transition"] = &setTransition<FillLayer, &FillLayer::setFillPatternTransition>;
- result["line-opacity"] = &setProperty<LineLayer, DataDrivenPropertyValue<float>, &LineLayer::setLineOpacity>;
+ result["line-opacity"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineOpacity, true, false>;
result["line-opacity-transition"] = &setTransition<LineLayer, &LineLayer::setLineOpacityTransition>;
- result["line-color"] = &setProperty<LineLayer, DataDrivenPropertyValue<Color>, &LineLayer::setLineColor>;
+ result["line-color"] = &setProperty<LineLayer, PropertyValue<Color>, &LineLayer::setLineColor, true, false>;
result["line-color-transition"] = &setTransition<LineLayer, &LineLayer::setLineColorTransition>;
- result["line-translate"] = &setProperty<LineLayer, PropertyValue<std::array<float, 2>>, &LineLayer::setLineTranslate>;
+ result["line-translate"] = &setProperty<LineLayer, PropertyValue<std::array<float, 2>>, &LineLayer::setLineTranslate, false, false>;
result["line-translate-transition"] = &setTransition<LineLayer, &LineLayer::setLineTranslateTransition>;
- result["line-translate-anchor"] = &setProperty<LineLayer, PropertyValue<TranslateAnchorType>, &LineLayer::setLineTranslateAnchor>;
+ result["line-translate-anchor"] = &setProperty<LineLayer, PropertyValue<TranslateAnchorType>, &LineLayer::setLineTranslateAnchor, false, false>;
result["line-translate-anchor-transition"] = &setTransition<LineLayer, &LineLayer::setLineTranslateAnchorTransition>;
- result["line-width"] = &setProperty<LineLayer, DataDrivenPropertyValue<float>, &LineLayer::setLineWidth>;
+ result["line-width"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineWidth, true, false>;
result["line-width-transition"] = &setTransition<LineLayer, &LineLayer::setLineWidthTransition>;
- result["line-gap-width"] = &setProperty<LineLayer, DataDrivenPropertyValue<float>, &LineLayer::setLineGapWidth>;
+ result["line-gap-width"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineGapWidth, true, false>;
result["line-gap-width-transition"] = &setTransition<LineLayer, &LineLayer::setLineGapWidthTransition>;
- result["line-offset"] = &setProperty<LineLayer, DataDrivenPropertyValue<float>, &LineLayer::setLineOffset>;
+ result["line-offset"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineOffset, true, false>;
result["line-offset-transition"] = &setTransition<LineLayer, &LineLayer::setLineOffsetTransition>;
- result["line-blur"] = &setProperty<LineLayer, DataDrivenPropertyValue<float>, &LineLayer::setLineBlur>;
+ result["line-blur"] = &setProperty<LineLayer, PropertyValue<float>, &LineLayer::setLineBlur, true, false>;
result["line-blur-transition"] = &setTransition<LineLayer, &LineLayer::setLineBlurTransition>;
- result["line-dasharray"] = &setProperty<LineLayer, PropertyValue<std::vector<float>>, &LineLayer::setLineDasharray>;
+ result["line-dasharray"] = &setProperty<LineLayer, PropertyValue<std::vector<float>>, &LineLayer::setLineDasharray, false, false>;
result["line-dasharray-transition"] = &setTransition<LineLayer, &LineLayer::setLineDasharrayTransition>;
- result["line-pattern"] = &setProperty<LineLayer, PropertyValue<std::string>, &LineLayer::setLinePattern>;
+ result["line-pattern"] = &setProperty<LineLayer, PropertyValue<std::string>, &LineLayer::setLinePattern, false, false>;
result["line-pattern-transition"] = &setTransition<LineLayer, &LineLayer::setLinePatternTransition>;
- result["icon-opacity"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setIconOpacity>;
+ result["icon-opacity"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconOpacity, true, false>;
result["icon-opacity-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setIconOpacityTransition>;
- result["icon-color"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<Color>, &SymbolLayer::setIconColor>;
+ result["icon-color"] = &setProperty<SymbolLayer, PropertyValue<Color>, &SymbolLayer::setIconColor, true, false>;
result["icon-color-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setIconColorTransition>;
- result["icon-halo-color"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<Color>, &SymbolLayer::setIconHaloColor>;
+ result["icon-halo-color"] = &setProperty<SymbolLayer, PropertyValue<Color>, &SymbolLayer::setIconHaloColor, true, false>;
result["icon-halo-color-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setIconHaloColorTransition>;
- result["icon-halo-width"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setIconHaloWidth>;
+ result["icon-halo-width"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconHaloWidth, true, false>;
result["icon-halo-width-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setIconHaloWidthTransition>;
- result["icon-halo-blur"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setIconHaloBlur>;
+ result["icon-halo-blur"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconHaloBlur, true, false>;
result["icon-halo-blur-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setIconHaloBlurTransition>;
- result["icon-translate"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 2>>, &SymbolLayer::setIconTranslate>;
+ result["icon-translate"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 2>>, &SymbolLayer::setIconTranslate, false, false>;
result["icon-translate-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setIconTranslateTransition>;
- result["icon-translate-anchor"] = &setProperty<SymbolLayer, PropertyValue<TranslateAnchorType>, &SymbolLayer::setIconTranslateAnchor>;
+ result["icon-translate-anchor"] = &setProperty<SymbolLayer, PropertyValue<TranslateAnchorType>, &SymbolLayer::setIconTranslateAnchor, false, false>;
result["icon-translate-anchor-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setIconTranslateAnchorTransition>;
- result["text-opacity"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextOpacity>;
+ result["text-opacity"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextOpacity, true, false>;
result["text-opacity-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setTextOpacityTransition>;
- result["text-color"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<Color>, &SymbolLayer::setTextColor>;
+ result["text-color"] = &setProperty<SymbolLayer, PropertyValue<Color>, &SymbolLayer::setTextColor, true, false>;
result["text-color-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setTextColorTransition>;
- result["text-halo-color"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<Color>, &SymbolLayer::setTextHaloColor>;
+ result["text-halo-color"] = &setProperty<SymbolLayer, PropertyValue<Color>, &SymbolLayer::setTextHaloColor, true, false>;
result["text-halo-color-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setTextHaloColorTransition>;
- result["text-halo-width"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextHaloWidth>;
+ result["text-halo-width"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextHaloWidth, true, false>;
result["text-halo-width-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setTextHaloWidthTransition>;
- result["text-halo-blur"] = &setProperty<SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextHaloBlur>;
+ result["text-halo-blur"] = &setProperty<SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextHaloBlur, true, false>;
result["text-halo-blur-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setTextHaloBlurTransition>;
- result["text-translate"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 2>>, &SymbolLayer::setTextTranslate>;
+ result["text-translate"] = &setProperty<SymbolLayer, PropertyValue<std::array<float, 2>>, &SymbolLayer::setTextTranslate, false, false>;
result["text-translate-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setTextTranslateTransition>;
- result["text-translate-anchor"] = &setProperty<SymbolLayer, PropertyValue<TranslateAnchorType>, &SymbolLayer::setTextTranslateAnchor>;
+ result["text-translate-anchor"] = &setProperty<SymbolLayer, PropertyValue<TranslateAnchorType>, &SymbolLayer::setTextTranslateAnchor, false, false>;
result["text-translate-anchor-transition"] = &setTransition<SymbolLayer, &SymbolLayer::setTextTranslateAnchorTransition>;
- result["circle-radius"] = &setProperty<CircleLayer, DataDrivenPropertyValue<float>, &CircleLayer::setCircleRadius>;
+ result["circle-radius"] = &setProperty<CircleLayer, PropertyValue<float>, &CircleLayer::setCircleRadius, true, false>;
result["circle-radius-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleRadiusTransition>;
- result["circle-color"] = &setProperty<CircleLayer, DataDrivenPropertyValue<Color>, &CircleLayer::setCircleColor>;
+ result["circle-color"] = &setProperty<CircleLayer, PropertyValue<Color>, &CircleLayer::setCircleColor, true, false>;
result["circle-color-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleColorTransition>;
- result["circle-blur"] = &setProperty<CircleLayer, DataDrivenPropertyValue<float>, &CircleLayer::setCircleBlur>;
+ result["circle-blur"] = &setProperty<CircleLayer, PropertyValue<float>, &CircleLayer::setCircleBlur, true, false>;
result["circle-blur-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleBlurTransition>;
- result["circle-opacity"] = &setProperty<CircleLayer, DataDrivenPropertyValue<float>, &CircleLayer::setCircleOpacity>;
+ result["circle-opacity"] = &setProperty<CircleLayer, PropertyValue<float>, &CircleLayer::setCircleOpacity, true, false>;
result["circle-opacity-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleOpacityTransition>;
- result["circle-translate"] = &setProperty<CircleLayer, PropertyValue<std::array<float, 2>>, &CircleLayer::setCircleTranslate>;
+ result["circle-translate"] = &setProperty<CircleLayer, PropertyValue<std::array<float, 2>>, &CircleLayer::setCircleTranslate, false, false>;
result["circle-translate-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleTranslateTransition>;
- result["circle-translate-anchor"] = &setProperty<CircleLayer, PropertyValue<TranslateAnchorType>, &CircleLayer::setCircleTranslateAnchor>;
+ result["circle-translate-anchor"] = &setProperty<CircleLayer, PropertyValue<TranslateAnchorType>, &CircleLayer::setCircleTranslateAnchor, false, false>;
result["circle-translate-anchor-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleTranslateAnchorTransition>;
- result["circle-pitch-scale"] = &setProperty<CircleLayer, PropertyValue<CirclePitchScaleType>, &CircleLayer::setCirclePitchScale>;
+ result["circle-pitch-scale"] = &setProperty<CircleLayer, PropertyValue<CirclePitchScaleType>, &CircleLayer::setCirclePitchScale, false, false>;
result["circle-pitch-scale-transition"] = &setTransition<CircleLayer, &CircleLayer::setCirclePitchScaleTransition>;
- result["circle-pitch-alignment"] = &setProperty<CircleLayer, PropertyValue<AlignmentType>, &CircleLayer::setCirclePitchAlignment>;
+ result["circle-pitch-alignment"] = &setProperty<CircleLayer, PropertyValue<AlignmentType>, &CircleLayer::setCirclePitchAlignment, false, false>;
result["circle-pitch-alignment-transition"] = &setTransition<CircleLayer, &CircleLayer::setCirclePitchAlignmentTransition>;
- result["circle-stroke-width"] = &setProperty<CircleLayer, DataDrivenPropertyValue<float>, &CircleLayer::setCircleStrokeWidth>;
+ result["circle-stroke-width"] = &setProperty<CircleLayer, PropertyValue<float>, &CircleLayer::setCircleStrokeWidth, true, false>;
result["circle-stroke-width-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleStrokeWidthTransition>;
- result["circle-stroke-color"] = &setProperty<CircleLayer, DataDrivenPropertyValue<Color>, &CircleLayer::setCircleStrokeColor>;
+ result["circle-stroke-color"] = &setProperty<CircleLayer, PropertyValue<Color>, &CircleLayer::setCircleStrokeColor, true, false>;
result["circle-stroke-color-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleStrokeColorTransition>;
- result["circle-stroke-opacity"] = &setProperty<CircleLayer, DataDrivenPropertyValue<float>, &CircleLayer::setCircleStrokeOpacity>;
+ result["circle-stroke-opacity"] = &setProperty<CircleLayer, PropertyValue<float>, &CircleLayer::setCircleStrokeOpacity, true, false>;
result["circle-stroke-opacity-transition"] = &setTransition<CircleLayer, &CircleLayer::setCircleStrokeOpacityTransition>;
- result["heatmap-radius"] = &setProperty<HeatmapLayer, DataDrivenPropertyValue<float>, &HeatmapLayer::setHeatmapRadius>;
+ result["heatmap-radius"] = &setProperty<HeatmapLayer, PropertyValue<float>, &HeatmapLayer::setHeatmapRadius, true, false>;
result["heatmap-radius-transition"] = &setTransition<HeatmapLayer, &HeatmapLayer::setHeatmapRadiusTransition>;
- result["heatmap-weight"] = &setProperty<HeatmapLayer, DataDrivenPropertyValue<float>, &HeatmapLayer::setHeatmapWeight>;
+ result["heatmap-weight"] = &setProperty<HeatmapLayer, PropertyValue<float>, &HeatmapLayer::setHeatmapWeight, true, false>;
result["heatmap-weight-transition"] = &setTransition<HeatmapLayer, &HeatmapLayer::setHeatmapWeightTransition>;
- result["heatmap-intensity"] = &setProperty<HeatmapLayer, PropertyValue<float>, &HeatmapLayer::setHeatmapIntensity>;
+ result["heatmap-intensity"] = &setProperty<HeatmapLayer, PropertyValue<float>, &HeatmapLayer::setHeatmapIntensity, false, false>;
result["heatmap-intensity-transition"] = &setTransition<HeatmapLayer, &HeatmapLayer::setHeatmapIntensityTransition>;
- result["heatmap-color"] = &setProperty<HeatmapLayer, ColorRampPropertyValue, &HeatmapLayer::setHeatmapColor>;
+ result["heatmap-color"] = &setProperty<HeatmapLayer, ColorRampPropertyValue, &HeatmapLayer::setHeatmapColor, false, false>;
result["heatmap-color-transition"] = &setTransition<HeatmapLayer, &HeatmapLayer::setHeatmapColorTransition>;
- result["heatmap-opacity"] = &setProperty<HeatmapLayer, PropertyValue<float>, &HeatmapLayer::setHeatmapOpacity>;
+ result["heatmap-opacity"] = &setProperty<HeatmapLayer, PropertyValue<float>, &HeatmapLayer::setHeatmapOpacity, false, false>;
result["heatmap-opacity-transition"] = &setTransition<HeatmapLayer, &HeatmapLayer::setHeatmapOpacityTransition>;
- result["fill-extrusion-opacity"] = &setProperty<FillExtrusionLayer, PropertyValue<float>, &FillExtrusionLayer::setFillExtrusionOpacity>;
+ result["fill-extrusion-opacity"] = &setProperty<FillExtrusionLayer, PropertyValue<float>, &FillExtrusionLayer::setFillExtrusionOpacity, false, false>;
result["fill-extrusion-opacity-transition"] = &setTransition<FillExtrusionLayer, &FillExtrusionLayer::setFillExtrusionOpacityTransition>;
- result["fill-extrusion-color"] = &setProperty<FillExtrusionLayer, DataDrivenPropertyValue<Color>, &FillExtrusionLayer::setFillExtrusionColor>;
+ result["fill-extrusion-color"] = &setProperty<FillExtrusionLayer, PropertyValue<Color>, &FillExtrusionLayer::setFillExtrusionColor, true, false>;
result["fill-extrusion-color-transition"] = &setTransition<FillExtrusionLayer, &FillExtrusionLayer::setFillExtrusionColorTransition>;
- result["fill-extrusion-translate"] = &setProperty<FillExtrusionLayer, PropertyValue<std::array<float, 2>>, &FillExtrusionLayer::setFillExtrusionTranslate>;
+ result["fill-extrusion-translate"] = &setProperty<FillExtrusionLayer, PropertyValue<std::array<float, 2>>, &FillExtrusionLayer::setFillExtrusionTranslate, false, false>;
result["fill-extrusion-translate-transition"] = &setTransition<FillExtrusionLayer, &FillExtrusionLayer::setFillExtrusionTranslateTransition>;
- result["fill-extrusion-translate-anchor"] = &setProperty<FillExtrusionLayer, PropertyValue<TranslateAnchorType>, &FillExtrusionLayer::setFillExtrusionTranslateAnchor>;
+ result["fill-extrusion-translate-anchor"] = &setProperty<FillExtrusionLayer, PropertyValue<TranslateAnchorType>, &FillExtrusionLayer::setFillExtrusionTranslateAnchor, false, false>;
result["fill-extrusion-translate-anchor-transition"] = &setTransition<FillExtrusionLayer, &FillExtrusionLayer::setFillExtrusionTranslateAnchorTransition>;
- result["fill-extrusion-pattern"] = &setProperty<FillExtrusionLayer, PropertyValue<std::string>, &FillExtrusionLayer::setFillExtrusionPattern>;
+ result["fill-extrusion-pattern"] = &setProperty<FillExtrusionLayer, PropertyValue<std::string>, &FillExtrusionLayer::setFillExtrusionPattern, false, false>;
result["fill-extrusion-pattern-transition"] = &setTransition<FillExtrusionLayer, &FillExtrusionLayer::setFillExtrusionPatternTransition>;
- result["fill-extrusion-height"] = &setProperty<FillExtrusionLayer, DataDrivenPropertyValue<float>, &FillExtrusionLayer::setFillExtrusionHeight>;
+ result["fill-extrusion-height"] = &setProperty<FillExtrusionLayer, PropertyValue<float>, &FillExtrusionLayer::setFillExtrusionHeight, true, false>;
result["fill-extrusion-height-transition"] = &setTransition<FillExtrusionLayer, &FillExtrusionLayer::setFillExtrusionHeightTransition>;
- result["fill-extrusion-base"] = &setProperty<FillExtrusionLayer, DataDrivenPropertyValue<float>, &FillExtrusionLayer::setFillExtrusionBase>;
+ result["fill-extrusion-base"] = &setProperty<FillExtrusionLayer, PropertyValue<float>, &FillExtrusionLayer::setFillExtrusionBase, true, false>;
result["fill-extrusion-base-transition"] = &setTransition<FillExtrusionLayer, &FillExtrusionLayer::setFillExtrusionBaseTransition>;
- result["raster-opacity"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterOpacity>;
+ result["raster-opacity"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterOpacity, false, false>;
result["raster-opacity-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterOpacityTransition>;
- result["raster-hue-rotate"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterHueRotate>;
+ result["raster-hue-rotate"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterHueRotate, false, false>;
result["raster-hue-rotate-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterHueRotateTransition>;
- result["raster-brightness-min"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterBrightnessMin>;
+ result["raster-brightness-min"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterBrightnessMin, false, false>;
result["raster-brightness-min-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterBrightnessMinTransition>;
- result["raster-brightness-max"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterBrightnessMax>;
+ result["raster-brightness-max"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterBrightnessMax, false, false>;
result["raster-brightness-max-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterBrightnessMaxTransition>;
- result["raster-saturation"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterSaturation>;
+ result["raster-saturation"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterSaturation, false, false>;
result["raster-saturation-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterSaturationTransition>;
- result["raster-contrast"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterContrast>;
+ result["raster-contrast"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterContrast, false, false>;
result["raster-contrast-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterContrastTransition>;
- result["raster-resampling"] = &setProperty<RasterLayer, PropertyValue<RasterResamplingType>, &RasterLayer::setRasterResampling>;
+ result["raster-resampling"] = &setProperty<RasterLayer, PropertyValue<RasterResamplingType>, &RasterLayer::setRasterResampling, false, false>;
result["raster-resampling-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterResamplingTransition>;
- result["raster-fade-duration"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterFadeDuration>;
+ result["raster-fade-duration"] = &setProperty<RasterLayer, PropertyValue<float>, &RasterLayer::setRasterFadeDuration, false, false>;
result["raster-fade-duration-transition"] = &setTransition<RasterLayer, &RasterLayer::setRasterFadeDurationTransition>;
- result["hillshade-illumination-direction"] = &setProperty<HillshadeLayer, PropertyValue<float>, &HillshadeLayer::setHillshadeIlluminationDirection>;
+ result["hillshade-illumination-direction"] = &setProperty<HillshadeLayer, PropertyValue<float>, &HillshadeLayer::setHillshadeIlluminationDirection, false, false>;
result["hillshade-illumination-direction-transition"] = &setTransition<HillshadeLayer, &HillshadeLayer::setHillshadeIlluminationDirectionTransition>;
- result["hillshade-illumination-anchor"] = &setProperty<HillshadeLayer, PropertyValue<HillshadeIlluminationAnchorType>, &HillshadeLayer::setHillshadeIlluminationAnchor>;
+ result["hillshade-illumination-anchor"] = &setProperty<HillshadeLayer, PropertyValue<HillshadeIlluminationAnchorType>, &HillshadeLayer::setHillshadeIlluminationAnchor, false, false>;
result["hillshade-illumination-anchor-transition"] = &setTransition<HillshadeLayer, &HillshadeLayer::setHillshadeIlluminationAnchorTransition>;
- result["hillshade-exaggeration"] = &setProperty<HillshadeLayer, PropertyValue<float>, &HillshadeLayer::setHillshadeExaggeration>;
+ result["hillshade-exaggeration"] = &setProperty<HillshadeLayer, PropertyValue<float>, &HillshadeLayer::setHillshadeExaggeration, false, false>;
result["hillshade-exaggeration-transition"] = &setTransition<HillshadeLayer, &HillshadeLayer::setHillshadeExaggerationTransition>;
- result["hillshade-shadow-color"] = &setProperty<HillshadeLayer, PropertyValue<Color>, &HillshadeLayer::setHillshadeShadowColor>;
+ result["hillshade-shadow-color"] = &setProperty<HillshadeLayer, PropertyValue<Color>, &HillshadeLayer::setHillshadeShadowColor, false, false>;
result["hillshade-shadow-color-transition"] = &setTransition<HillshadeLayer, &HillshadeLayer::setHillshadeShadowColorTransition>;
- result["hillshade-highlight-color"] = &setProperty<HillshadeLayer, PropertyValue<Color>, &HillshadeLayer::setHillshadeHighlightColor>;
+ result["hillshade-highlight-color"] = &setProperty<HillshadeLayer, PropertyValue<Color>, &HillshadeLayer::setHillshadeHighlightColor, false, false>;
result["hillshade-highlight-color-transition"] = &setTransition<HillshadeLayer, &HillshadeLayer::setHillshadeHighlightColorTransition>;
- result["hillshade-accent-color"] = &setProperty<HillshadeLayer, PropertyValue<Color>, &HillshadeLayer::setHillshadeAccentColor>;
+ result["hillshade-accent-color"] = &setProperty<HillshadeLayer, PropertyValue<Color>, &HillshadeLayer::setHillshadeAccentColor, false, false>;
result["hillshade-accent-color-transition"] = &setTransition<HillshadeLayer, &HillshadeLayer::setHillshadeAccentColorTransition>;
- result["background-color"] = &setProperty<BackgroundLayer, PropertyValue<Color>, &BackgroundLayer::setBackgroundColor>;
+ result["background-color"] = &setProperty<BackgroundLayer, PropertyValue<Color>, &BackgroundLayer::setBackgroundColor, false, false>;
result["background-color-transition"] = &setTransition<BackgroundLayer, &BackgroundLayer::setBackgroundColorTransition>;
- result["background-pattern"] = &setProperty<BackgroundLayer, PropertyValue<std::string>, &BackgroundLayer::setBackgroundPattern>;
+ result["background-pattern"] = &setProperty<BackgroundLayer, PropertyValue<std::string>, &BackgroundLayer::setBackgroundPattern, false, false>;
result["background-pattern-transition"] = &setTransition<BackgroundLayer, &BackgroundLayer::setBackgroundPatternTransition>;
- result["background-opacity"] = &setProperty<BackgroundLayer, PropertyValue<float>, &BackgroundLayer::setBackgroundOpacity>;
+ result["background-opacity"] = &setProperty<BackgroundLayer, PropertyValue<float>, &BackgroundLayer::setBackgroundOpacity, false, false>;
result["background-opacity-transition"] = &setTransition<BackgroundLayer, &BackgroundLayer::setBackgroundOpacityTransition>;
return result;
diff --git a/src/mbgl/style/conversion/make_property_setters.hpp.ejs b/src/mbgl/style/conversion/make_property_setters.hpp.ejs
index 2b8925817d..fbf2f93fd6 100644
--- a/src/mbgl/style/conversion/make_property_setters.hpp.ejs
+++ b/src/mbgl/style/conversion/make_property_setters.hpp.ejs
@@ -21,7 +21,7 @@ inline auto makeLayoutPropertySetters() {
<% for (const layer of locals.layers) { -%>
<% for (const property of layer.layoutProperties) { -%>
- result["<%- property.name %>"] = &setProperty<<%- camelize(layer.type) %>Layer, <%- propertyValueType(property) %>, &<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %><%- property.name === 'icon-image' || property.name === 'text-field' ? ', true' : '' %>>;
+ result["<%- property.name %>"] = &setProperty<<%- camelize(layer.type) %>Layer, <%- propertyValueType(property) %>, &<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>, <%- property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven' %>, <%- property.name === 'icon-image' || property.name === 'text-field' %>>;
<% } -%>
<% } -%>
@@ -33,7 +33,7 @@ inline auto makePaintPropertySetters() {
<% for (const layer of locals.layers) { -%>
<% for (const property of layer.paintProperties) { -%>
- result["<%- property.name %>"] = &setProperty<<%- camelize(layer.type) %>Layer, <%- propertyValueType(property) %>, &<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>>;
+ result["<%- property.name %>"] = &setProperty<<%- camelize(layer.type) %>Layer, <%- propertyValueType(property) %>, &<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>, <%- property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven' %>, <%- property.name === 'icon-image' || property.name === 'text-field' %>>;
result["<%- property.name %>-transition"] = &setTransition<<%- camelize(layer.type) %>Layer, &<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>Transition>;
<% } -%>
diff --git a/src/mbgl/style/conversion/property_setter.hpp b/src/mbgl/style/conversion/property_setter.hpp
index cdb585aa29..3c5c65f96a 100644
--- a/src/mbgl/style/conversion/property_setter.hpp
+++ b/src/mbgl/style/conversion/property_setter.hpp
@@ -6,7 +6,6 @@
#include <mbgl/style/conversion/color_ramp_property_value.hpp>
#include <mbgl/style/conversion/constant.hpp>
#include <mbgl/style/conversion/property_value.hpp>
-#include <mbgl/style/conversion/data_driven_property_value.hpp>
#include <mbgl/style/conversion/transition_options.hpp>
#include <string>
@@ -17,7 +16,7 @@ namespace conversion {
using PropertySetter = optional<Error> (*) (Layer&, const Convertible&);
-template <class L, class PropertyValue, void (L::*setter)(PropertyValue), bool convertTokens = false>
+template <class L, class PropertyValue, void (L::*setter)(PropertyValue), bool allowDataExpressions, bool convertTokens>
optional<Error> setProperty(Layer& layer, const Convertible& value) {
auto* typedLayer = layer.as<L>();
if (!typedLayer) {
@@ -25,7 +24,7 @@ optional<Error> setProperty(Layer& layer, const Convertible& value) {
}
Error error;
- optional<PropertyValue> typedValue = convert<PropertyValue>(value, error, convertTokens);
+ optional<PropertyValue> typedValue = convert<PropertyValue>(value, error, allowDataExpressions, convertTokens);
if (!typedValue) {
return error;
}
diff --git a/src/mbgl/style/conversion/stringify.hpp b/src/mbgl/style/conversion/stringify.hpp
index 77a39c51f9..3d188b6390 100644
--- a/src/mbgl/style/conversion/stringify.hpp
+++ b/src/mbgl/style/conversion/stringify.hpp
@@ -2,7 +2,6 @@
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
-#include <mbgl/style/data_driven_property_value.hpp>
#include <mbgl/util/enum.hpp>
#include <mbgl/util/color.hpp>
#include <mbgl/util/feature.hpp>
@@ -155,19 +154,6 @@ void stringify(Writer& writer, const PropertyValue<T>& value) {
}
}
-template <class Writer, class T>
-void stringify(Writer& writer, const DataDrivenPropertyValue<T>& v) {
- v.evaluate([&] (const auto& v_) { stringify(writer, v_); });
-}
-
-template <class Property, class Writer, class T>
-void stringify(Writer& writer, const DataDrivenPropertyValue<T>& value) {
- if (!value.isUndefined()) {
- writer.Key(Property::key);
- stringify(writer, value);
- }
-}
-
} // namespace conversion
} // namespace style
} // namespace mbgl
diff --git a/src/mbgl/style/layers/circle_layer.cpp b/src/mbgl/style/layers/circle_layer.cpp
index 6dd744df1f..d435ce89e1 100644
--- a/src/mbgl/style/layers/circle_layer.cpp
+++ b/src/mbgl/style/layers/circle_layer.cpp
@@ -96,15 +96,15 @@ void CircleLayer::setMaxZoom(float maxZoom) {
// Paint properties
-DataDrivenPropertyValue<float> CircleLayer::getDefaultCircleRadius() {
+PropertyValue<float> CircleLayer::getDefaultCircleRadius() {
return { 5 };
}
-DataDrivenPropertyValue<float> CircleLayer::getCircleRadius() const {
+PropertyValue<float> CircleLayer::getCircleRadius() const {
return impl().paint.template get<CircleRadius>().value;
}
-void CircleLayer::setCircleRadius(DataDrivenPropertyValue<float> value) {
+void CircleLayer::setCircleRadius(PropertyValue<float> value) {
if (value == getCircleRadius())
return;
auto impl_ = mutableImpl();
@@ -123,15 +123,15 @@ TransitionOptions CircleLayer::getCircleRadiusTransition() const {
return impl().paint.template get<CircleRadius>().options;
}
-DataDrivenPropertyValue<Color> CircleLayer::getDefaultCircleColor() {
+PropertyValue<Color> CircleLayer::getDefaultCircleColor() {
return { Color::black() };
}
-DataDrivenPropertyValue<Color> CircleLayer::getCircleColor() const {
+PropertyValue<Color> CircleLayer::getCircleColor() const {
return impl().paint.template get<CircleColor>().value;
}
-void CircleLayer::setCircleColor(DataDrivenPropertyValue<Color> value) {
+void CircleLayer::setCircleColor(PropertyValue<Color> value) {
if (value == getCircleColor())
return;
auto impl_ = mutableImpl();
@@ -150,15 +150,15 @@ TransitionOptions CircleLayer::getCircleColorTransition() const {
return impl().paint.template get<CircleColor>().options;
}
-DataDrivenPropertyValue<float> CircleLayer::getDefaultCircleBlur() {
+PropertyValue<float> CircleLayer::getDefaultCircleBlur() {
return { 0 };
}
-DataDrivenPropertyValue<float> CircleLayer::getCircleBlur() const {
+PropertyValue<float> CircleLayer::getCircleBlur() const {
return impl().paint.template get<CircleBlur>().value;
}
-void CircleLayer::setCircleBlur(DataDrivenPropertyValue<float> value) {
+void CircleLayer::setCircleBlur(PropertyValue<float> value) {
if (value == getCircleBlur())
return;
auto impl_ = mutableImpl();
@@ -177,15 +177,15 @@ TransitionOptions CircleLayer::getCircleBlurTransition() const {
return impl().paint.template get<CircleBlur>().options;
}
-DataDrivenPropertyValue<float> CircleLayer::getDefaultCircleOpacity() {
+PropertyValue<float> CircleLayer::getDefaultCircleOpacity() {
return { 1 };
}
-DataDrivenPropertyValue<float> CircleLayer::getCircleOpacity() const {
+PropertyValue<float> CircleLayer::getCircleOpacity() const {
return impl().paint.template get<CircleOpacity>().value;
}
-void CircleLayer::setCircleOpacity(DataDrivenPropertyValue<float> value) {
+void CircleLayer::setCircleOpacity(PropertyValue<float> value) {
if (value == getCircleOpacity())
return;
auto impl_ = mutableImpl();
@@ -312,15 +312,15 @@ TransitionOptions CircleLayer::getCirclePitchAlignmentTransition() const {
return impl().paint.template get<CirclePitchAlignment>().options;
}
-DataDrivenPropertyValue<float> CircleLayer::getDefaultCircleStrokeWidth() {
+PropertyValue<float> CircleLayer::getDefaultCircleStrokeWidth() {
return { 0 };
}
-DataDrivenPropertyValue<float> CircleLayer::getCircleStrokeWidth() const {
+PropertyValue<float> CircleLayer::getCircleStrokeWidth() const {
return impl().paint.template get<CircleStrokeWidth>().value;
}
-void CircleLayer::setCircleStrokeWidth(DataDrivenPropertyValue<float> value) {
+void CircleLayer::setCircleStrokeWidth(PropertyValue<float> value) {
if (value == getCircleStrokeWidth())
return;
auto impl_ = mutableImpl();
@@ -339,15 +339,15 @@ TransitionOptions CircleLayer::getCircleStrokeWidthTransition() const {
return impl().paint.template get<CircleStrokeWidth>().options;
}
-DataDrivenPropertyValue<Color> CircleLayer::getDefaultCircleStrokeColor() {
+PropertyValue<Color> CircleLayer::getDefaultCircleStrokeColor() {
return { Color::black() };
}
-DataDrivenPropertyValue<Color> CircleLayer::getCircleStrokeColor() const {
+PropertyValue<Color> CircleLayer::getCircleStrokeColor() const {
return impl().paint.template get<CircleStrokeColor>().value;
}
-void CircleLayer::setCircleStrokeColor(DataDrivenPropertyValue<Color> value) {
+void CircleLayer::setCircleStrokeColor(PropertyValue<Color> value) {
if (value == getCircleStrokeColor())
return;
auto impl_ = mutableImpl();
@@ -366,15 +366,15 @@ TransitionOptions CircleLayer::getCircleStrokeColorTransition() const {
return impl().paint.template get<CircleStrokeColor>().options;
}
-DataDrivenPropertyValue<float> CircleLayer::getDefaultCircleStrokeOpacity() {
+PropertyValue<float> CircleLayer::getDefaultCircleStrokeOpacity() {
return { 1 };
}
-DataDrivenPropertyValue<float> CircleLayer::getCircleStrokeOpacity() const {
+PropertyValue<float> CircleLayer::getCircleStrokeOpacity() const {
return impl().paint.template get<CircleStrokeOpacity>().value;
}
-void CircleLayer::setCircleStrokeOpacity(DataDrivenPropertyValue<float> value) {
+void CircleLayer::setCircleStrokeOpacity(PropertyValue<float> value) {
if (value == getCircleStrokeOpacity())
return;
auto impl_ = mutableImpl();
diff --git a/src/mbgl/style/layers/fill_extrusion_layer.cpp b/src/mbgl/style/layers/fill_extrusion_layer.cpp
index c5b4ef0ef3..829a24f354 100644
--- a/src/mbgl/style/layers/fill_extrusion_layer.cpp
+++ b/src/mbgl/style/layers/fill_extrusion_layer.cpp
@@ -123,15 +123,15 @@ TransitionOptions FillExtrusionLayer::getFillExtrusionOpacityTransition() const
return impl().paint.template get<FillExtrusionOpacity>().options;
}
-DataDrivenPropertyValue<Color> FillExtrusionLayer::getDefaultFillExtrusionColor() {
+PropertyValue<Color> FillExtrusionLayer::getDefaultFillExtrusionColor() {
return { Color::black() };
}
-DataDrivenPropertyValue<Color> FillExtrusionLayer::getFillExtrusionColor() const {
+PropertyValue<Color> FillExtrusionLayer::getFillExtrusionColor() const {
return impl().paint.template get<FillExtrusionColor>().value;
}
-void FillExtrusionLayer::setFillExtrusionColor(DataDrivenPropertyValue<Color> value) {
+void FillExtrusionLayer::setFillExtrusionColor(PropertyValue<Color> value) {
if (value == getFillExtrusionColor())
return;
auto impl_ = mutableImpl();
@@ -231,15 +231,15 @@ TransitionOptions FillExtrusionLayer::getFillExtrusionPatternTransition() const
return impl().paint.template get<FillExtrusionPattern>().options;
}
-DataDrivenPropertyValue<float> FillExtrusionLayer::getDefaultFillExtrusionHeight() {
+PropertyValue<float> FillExtrusionLayer::getDefaultFillExtrusionHeight() {
return { 0 };
}
-DataDrivenPropertyValue<float> FillExtrusionLayer::getFillExtrusionHeight() const {
+PropertyValue<float> FillExtrusionLayer::getFillExtrusionHeight() const {
return impl().paint.template get<FillExtrusionHeight>().value;
}
-void FillExtrusionLayer::setFillExtrusionHeight(DataDrivenPropertyValue<float> value) {
+void FillExtrusionLayer::setFillExtrusionHeight(PropertyValue<float> value) {
if (value == getFillExtrusionHeight())
return;
auto impl_ = mutableImpl();
@@ -258,15 +258,15 @@ TransitionOptions FillExtrusionLayer::getFillExtrusionHeightTransition() const {
return impl().paint.template get<FillExtrusionHeight>().options;
}
-DataDrivenPropertyValue<float> FillExtrusionLayer::getDefaultFillExtrusionBase() {
+PropertyValue<float> FillExtrusionLayer::getDefaultFillExtrusionBase() {
return { 0 };
}
-DataDrivenPropertyValue<float> FillExtrusionLayer::getFillExtrusionBase() const {
+PropertyValue<float> FillExtrusionLayer::getFillExtrusionBase() const {
return impl().paint.template get<FillExtrusionBase>().value;
}
-void FillExtrusionLayer::setFillExtrusionBase(DataDrivenPropertyValue<float> value) {
+void FillExtrusionLayer::setFillExtrusionBase(PropertyValue<float> value) {
if (value == getFillExtrusionBase())
return;
auto impl_ = mutableImpl();
diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp
index 99a2a51ed0..8eebd54e3c 100644
--- a/src/mbgl/style/layers/fill_layer.cpp
+++ b/src/mbgl/style/layers/fill_layer.cpp
@@ -123,15 +123,15 @@ TransitionOptions FillLayer::getFillAntialiasTransition() const {
return impl().paint.template get<FillAntialias>().options;
}
-DataDrivenPropertyValue<float> FillLayer::getDefaultFillOpacity() {
+PropertyValue<float> FillLayer::getDefaultFillOpacity() {
return { 1 };
}
-DataDrivenPropertyValue<float> FillLayer::getFillOpacity() const {
+PropertyValue<float> FillLayer::getFillOpacity() const {
return impl().paint.template get<FillOpacity>().value;
}
-void FillLayer::setFillOpacity(DataDrivenPropertyValue<float> value) {
+void FillLayer::setFillOpacity(PropertyValue<float> value) {
if (value == getFillOpacity())
return;
auto impl_ = mutableImpl();
@@ -150,15 +150,15 @@ TransitionOptions FillLayer::getFillOpacityTransition() const {
return impl().paint.template get<FillOpacity>().options;
}
-DataDrivenPropertyValue<Color> FillLayer::getDefaultFillColor() {
+PropertyValue<Color> FillLayer::getDefaultFillColor() {
return { Color::black() };
}
-DataDrivenPropertyValue<Color> FillLayer::getFillColor() const {
+PropertyValue<Color> FillLayer::getFillColor() const {
return impl().paint.template get<FillColor>().value;
}
-void FillLayer::setFillColor(DataDrivenPropertyValue<Color> value) {
+void FillLayer::setFillColor(PropertyValue<Color> value) {
if (value == getFillColor())
return;
auto impl_ = mutableImpl();
@@ -177,15 +177,15 @@ TransitionOptions FillLayer::getFillColorTransition() const {
return impl().paint.template get<FillColor>().options;
}
-DataDrivenPropertyValue<Color> FillLayer::getDefaultFillOutlineColor() {
+PropertyValue<Color> FillLayer::getDefaultFillOutlineColor() {
return { {} };
}
-DataDrivenPropertyValue<Color> FillLayer::getFillOutlineColor() const {
+PropertyValue<Color> FillLayer::getFillOutlineColor() const {
return impl().paint.template get<FillOutlineColor>().value;
}
-void FillLayer::setFillOutlineColor(DataDrivenPropertyValue<Color> value) {
+void FillLayer::setFillOutlineColor(PropertyValue<Color> value) {
if (value == getFillOutlineColor())
return;
auto impl_ = mutableImpl();
diff --git a/src/mbgl/style/layers/heatmap_layer.cpp b/src/mbgl/style/layers/heatmap_layer.cpp
index c2a1545a00..21016ee509 100644
--- a/src/mbgl/style/layers/heatmap_layer.cpp
+++ b/src/mbgl/style/layers/heatmap_layer.cpp
@@ -100,15 +100,15 @@ void HeatmapLayer::setMaxZoom(float maxZoom) {
// Paint properties
-DataDrivenPropertyValue<float> HeatmapLayer::getDefaultHeatmapRadius() {
+PropertyValue<float> HeatmapLayer::getDefaultHeatmapRadius() {
return { 30 };
}
-DataDrivenPropertyValue<float> HeatmapLayer::getHeatmapRadius() const {
+PropertyValue<float> HeatmapLayer::getHeatmapRadius() const {
return impl().paint.template get<HeatmapRadius>().value;
}
-void HeatmapLayer::setHeatmapRadius(DataDrivenPropertyValue<float> value) {
+void HeatmapLayer::setHeatmapRadius(PropertyValue<float> value) {
if (value == getHeatmapRadius())
return;
auto impl_ = mutableImpl();
@@ -127,15 +127,15 @@ TransitionOptions HeatmapLayer::getHeatmapRadiusTransition() const {
return impl().paint.template get<HeatmapRadius>().options;
}
-DataDrivenPropertyValue<float> HeatmapLayer::getDefaultHeatmapWeight() {
+PropertyValue<float> HeatmapLayer::getDefaultHeatmapWeight() {
return { 1 };
}
-DataDrivenPropertyValue<float> HeatmapLayer::getHeatmapWeight() const {
+PropertyValue<float> HeatmapLayer::getHeatmapWeight() const {
return impl().paint.template get<HeatmapWeight>().value;
}
-void HeatmapLayer::setHeatmapWeight(DataDrivenPropertyValue<float> value) {
+void HeatmapLayer::setHeatmapWeight(PropertyValue<float> value) {
if (value == getHeatmapWeight())
return;
auto impl_ = mutableImpl();
diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp
index 56eac34c00..0cda849c0f 100644
--- a/src/mbgl/style/layers/line_layer.cpp
+++ b/src/mbgl/style/layers/line_layer.cpp
@@ -110,15 +110,15 @@ void LineLayer::setLineCap(PropertyValue<LineCapType> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<LineJoinType> LineLayer::getDefaultLineJoin() {
+PropertyValue<LineJoinType> LineLayer::getDefaultLineJoin() {
return LineJoin::defaultValue();
}
-DataDrivenPropertyValue<LineJoinType> LineLayer::getLineJoin() const {
+PropertyValue<LineJoinType> LineLayer::getLineJoin() const {
return impl().layout.get<LineJoin>();
}
-void LineLayer::setLineJoin(DataDrivenPropertyValue<LineJoinType> value) {
+void LineLayer::setLineJoin(PropertyValue<LineJoinType> value) {
if (value == getLineJoin())
return;
auto impl_ = mutableImpl();
@@ -161,15 +161,15 @@ void LineLayer::setLineRoundLimit(PropertyValue<float> value) {
// Paint properties
-DataDrivenPropertyValue<float> LineLayer::getDefaultLineOpacity() {
+PropertyValue<float> LineLayer::getDefaultLineOpacity() {
return { 1 };
}
-DataDrivenPropertyValue<float> LineLayer::getLineOpacity() const {
+PropertyValue<float> LineLayer::getLineOpacity() const {
return impl().paint.template get<LineOpacity>().value;
}
-void LineLayer::setLineOpacity(DataDrivenPropertyValue<float> value) {
+void LineLayer::setLineOpacity(PropertyValue<float> value) {
if (value == getLineOpacity())
return;
auto impl_ = mutableImpl();
@@ -188,15 +188,15 @@ TransitionOptions LineLayer::getLineOpacityTransition() const {
return impl().paint.template get<LineOpacity>().options;
}
-DataDrivenPropertyValue<Color> LineLayer::getDefaultLineColor() {
+PropertyValue<Color> LineLayer::getDefaultLineColor() {
return { Color::black() };
}
-DataDrivenPropertyValue<Color> LineLayer::getLineColor() const {
+PropertyValue<Color> LineLayer::getLineColor() const {
return impl().paint.template get<LineColor>().value;
}
-void LineLayer::setLineColor(DataDrivenPropertyValue<Color> value) {
+void LineLayer::setLineColor(PropertyValue<Color> value) {
if (value == getLineColor())
return;
auto impl_ = mutableImpl();
@@ -269,15 +269,15 @@ TransitionOptions LineLayer::getLineTranslateAnchorTransition() const {
return impl().paint.template get<LineTranslateAnchor>().options;
}
-DataDrivenPropertyValue<float> LineLayer::getDefaultLineWidth() {
+PropertyValue<float> LineLayer::getDefaultLineWidth() {
return { 1 };
}
-DataDrivenPropertyValue<float> LineLayer::getLineWidth() const {
+PropertyValue<float> LineLayer::getLineWidth() const {
return impl().paint.template get<LineWidth>().value;
}
-void LineLayer::setLineWidth(DataDrivenPropertyValue<float> value) {
+void LineLayer::setLineWidth(PropertyValue<float> value) {
if (value == getLineWidth())
return;
auto impl_ = mutableImpl();
@@ -296,15 +296,15 @@ TransitionOptions LineLayer::getLineWidthTransition() const {
return impl().paint.template get<LineWidth>().options;
}
-DataDrivenPropertyValue<float> LineLayer::getDefaultLineGapWidth() {
+PropertyValue<float> LineLayer::getDefaultLineGapWidth() {
return { 0 };
}
-DataDrivenPropertyValue<float> LineLayer::getLineGapWidth() const {
+PropertyValue<float> LineLayer::getLineGapWidth() const {
return impl().paint.template get<LineGapWidth>().value;
}
-void LineLayer::setLineGapWidth(DataDrivenPropertyValue<float> value) {
+void LineLayer::setLineGapWidth(PropertyValue<float> value) {
if (value == getLineGapWidth())
return;
auto impl_ = mutableImpl();
@@ -323,15 +323,15 @@ TransitionOptions LineLayer::getLineGapWidthTransition() const {
return impl().paint.template get<LineGapWidth>().options;
}
-DataDrivenPropertyValue<float> LineLayer::getDefaultLineOffset() {
+PropertyValue<float> LineLayer::getDefaultLineOffset() {
return { 0 };
}
-DataDrivenPropertyValue<float> LineLayer::getLineOffset() const {
+PropertyValue<float> LineLayer::getLineOffset() const {
return impl().paint.template get<LineOffset>().value;
}
-void LineLayer::setLineOffset(DataDrivenPropertyValue<float> value) {
+void LineLayer::setLineOffset(PropertyValue<float> value) {
if (value == getLineOffset())
return;
auto impl_ = mutableImpl();
@@ -350,15 +350,15 @@ TransitionOptions LineLayer::getLineOffsetTransition() const {
return impl().paint.template get<LineOffset>().options;
}
-DataDrivenPropertyValue<float> LineLayer::getDefaultLineBlur() {
+PropertyValue<float> LineLayer::getDefaultLineBlur() {
return { 0 };
}
-DataDrivenPropertyValue<float> LineLayer::getLineBlur() const {
+PropertyValue<float> LineLayer::getLineBlur() const {
return impl().paint.template get<LineBlur>().value;
}
-void LineLayer::setLineBlur(DataDrivenPropertyValue<float> value) {
+void LineLayer::setLineBlur(PropertyValue<float> value) {
if (value == getLineBlur())
return;
auto impl_ = mutableImpl();
diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp
index c940f3b00a..c416c6a6c5 100644
--- a/src/mbgl/style/layers/symbol_layer.cpp
+++ b/src/mbgl/style/layers/symbol_layer.cpp
@@ -206,15 +206,15 @@ void SymbolLayer::setIconRotationAlignment(PropertyValue<AlignmentType> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultIconSize() {
+PropertyValue<float> SymbolLayer::getDefaultIconSize() {
return IconSize::defaultValue();
}
-DataDrivenPropertyValue<float> SymbolLayer::getIconSize() const {
+PropertyValue<float> SymbolLayer::getIconSize() const {
return impl().layout.get<IconSize>();
}
-void SymbolLayer::setIconSize(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setIconSize(PropertyValue<float> value) {
if (value == getIconSize())
return;
auto impl_ = mutableImpl();
@@ -254,15 +254,15 @@ void SymbolLayer::setIconTextFitPadding(PropertyValue<std::array<float, 4>> valu
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<std::string> SymbolLayer::getDefaultIconImage() {
+PropertyValue<std::string> SymbolLayer::getDefaultIconImage() {
return IconImage::defaultValue();
}
-DataDrivenPropertyValue<std::string> SymbolLayer::getIconImage() const {
+PropertyValue<std::string> SymbolLayer::getIconImage() const {
return impl().layout.get<IconImage>();
}
-void SymbolLayer::setIconImage(DataDrivenPropertyValue<std::string> value) {
+void SymbolLayer::setIconImage(PropertyValue<std::string> value) {
if (value == getIconImage())
return;
auto impl_ = mutableImpl();
@@ -270,15 +270,15 @@ void SymbolLayer::setIconImage(DataDrivenPropertyValue<std::string> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultIconRotate() {
+PropertyValue<float> SymbolLayer::getDefaultIconRotate() {
return IconRotate::defaultValue();
}
-DataDrivenPropertyValue<float> SymbolLayer::getIconRotate() const {
+PropertyValue<float> SymbolLayer::getIconRotate() const {
return impl().layout.get<IconRotate>();
}
-void SymbolLayer::setIconRotate(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setIconRotate(PropertyValue<float> value) {
if (value == getIconRotate())
return;
auto impl_ = mutableImpl();
@@ -318,15 +318,15 @@ void SymbolLayer::setIconKeepUpright(PropertyValue<bool> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconOffset() {
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconOffset() {
return IconOffset::defaultValue();
}
-DataDrivenPropertyValue<std::array<float, 2>> SymbolLayer::getIconOffset() const {
+PropertyValue<std::array<float, 2>> SymbolLayer::getIconOffset() const {
return impl().layout.get<IconOffset>();
}
-void SymbolLayer::setIconOffset(DataDrivenPropertyValue<std::array<float, 2>> value) {
+void SymbolLayer::setIconOffset(PropertyValue<std::array<float, 2>> value) {
if (value == getIconOffset())
return;
auto impl_ = mutableImpl();
@@ -334,15 +334,15 @@ void SymbolLayer::setIconOffset(DataDrivenPropertyValue<std::array<float, 2>> va
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<SymbolAnchorType> SymbolLayer::getDefaultIconAnchor() {
+PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultIconAnchor() {
return IconAnchor::defaultValue();
}
-DataDrivenPropertyValue<SymbolAnchorType> SymbolLayer::getIconAnchor() const {
+PropertyValue<SymbolAnchorType> SymbolLayer::getIconAnchor() const {
return impl().layout.get<IconAnchor>();
}
-void SymbolLayer::setIconAnchor(DataDrivenPropertyValue<SymbolAnchorType> value) {
+void SymbolLayer::setIconAnchor(PropertyValue<SymbolAnchorType> value) {
if (value == getIconAnchor())
return;
auto impl_ = mutableImpl();
@@ -398,15 +398,15 @@ void SymbolLayer::setTextRotationAlignment(PropertyValue<AlignmentType> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<std::string> SymbolLayer::getDefaultTextField() {
+PropertyValue<std::string> SymbolLayer::getDefaultTextField() {
return TextField::defaultValue();
}
-DataDrivenPropertyValue<std::string> SymbolLayer::getTextField() const {
+PropertyValue<std::string> SymbolLayer::getTextField() const {
return impl().layout.get<TextField>();
}
-void SymbolLayer::setTextField(DataDrivenPropertyValue<std::string> value) {
+void SymbolLayer::setTextField(PropertyValue<std::string> value) {
if (value == getTextField())
return;
auto impl_ = mutableImpl();
@@ -414,15 +414,15 @@ void SymbolLayer::setTextField(DataDrivenPropertyValue<std::string> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<std::vector<std::string>> SymbolLayer::getDefaultTextFont() {
+PropertyValue<std::vector<std::string>> SymbolLayer::getDefaultTextFont() {
return TextFont::defaultValue();
}
-DataDrivenPropertyValue<std::vector<std::string>> SymbolLayer::getTextFont() const {
+PropertyValue<std::vector<std::string>> SymbolLayer::getTextFont() const {
return impl().layout.get<TextFont>();
}
-void SymbolLayer::setTextFont(DataDrivenPropertyValue<std::vector<std::string>> value) {
+void SymbolLayer::setTextFont(PropertyValue<std::vector<std::string>> value) {
if (value == getTextFont())
return;
auto impl_ = mutableImpl();
@@ -430,15 +430,15 @@ void SymbolLayer::setTextFont(DataDrivenPropertyValue<std::vector<std::string>>
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextSize() {
+PropertyValue<float> SymbolLayer::getDefaultTextSize() {
return TextSize::defaultValue();
}
-DataDrivenPropertyValue<float> SymbolLayer::getTextSize() const {
+PropertyValue<float> SymbolLayer::getTextSize() const {
return impl().layout.get<TextSize>();
}
-void SymbolLayer::setTextSize(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setTextSize(PropertyValue<float> value) {
if (value == getTextSize())
return;
auto impl_ = mutableImpl();
@@ -446,15 +446,15 @@ void SymbolLayer::setTextSize(DataDrivenPropertyValue<float> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextMaxWidth() {
+PropertyValue<float> SymbolLayer::getDefaultTextMaxWidth() {
return TextMaxWidth::defaultValue();
}
-DataDrivenPropertyValue<float> SymbolLayer::getTextMaxWidth() const {
+PropertyValue<float> SymbolLayer::getTextMaxWidth() const {
return impl().layout.get<TextMaxWidth>();
}
-void SymbolLayer::setTextMaxWidth(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setTextMaxWidth(PropertyValue<float> value) {
if (value == getTextMaxWidth())
return;
auto impl_ = mutableImpl();
@@ -478,15 +478,15 @@ void SymbolLayer::setTextLineHeight(PropertyValue<float> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextLetterSpacing() {
+PropertyValue<float> SymbolLayer::getDefaultTextLetterSpacing() {
return TextLetterSpacing::defaultValue();
}
-DataDrivenPropertyValue<float> SymbolLayer::getTextLetterSpacing() const {
+PropertyValue<float> SymbolLayer::getTextLetterSpacing() const {
return impl().layout.get<TextLetterSpacing>();
}
-void SymbolLayer::setTextLetterSpacing(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setTextLetterSpacing(PropertyValue<float> value) {
if (value == getTextLetterSpacing())
return;
auto impl_ = mutableImpl();
@@ -494,15 +494,15 @@ void SymbolLayer::setTextLetterSpacing(DataDrivenPropertyValue<float> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<TextJustifyType> SymbolLayer::getDefaultTextJustify() {
+PropertyValue<TextJustifyType> SymbolLayer::getDefaultTextJustify() {
return TextJustify::defaultValue();
}
-DataDrivenPropertyValue<TextJustifyType> SymbolLayer::getTextJustify() const {
+PropertyValue<TextJustifyType> SymbolLayer::getTextJustify() const {
return impl().layout.get<TextJustify>();
}
-void SymbolLayer::setTextJustify(DataDrivenPropertyValue<TextJustifyType> value) {
+void SymbolLayer::setTextJustify(PropertyValue<TextJustifyType> value) {
if (value == getTextJustify())
return;
auto impl_ = mutableImpl();
@@ -510,15 +510,15 @@ void SymbolLayer::setTextJustify(DataDrivenPropertyValue<TextJustifyType> value)
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<SymbolAnchorType> SymbolLayer::getDefaultTextAnchor() {
+PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultTextAnchor() {
return TextAnchor::defaultValue();
}
-DataDrivenPropertyValue<SymbolAnchorType> SymbolLayer::getTextAnchor() const {
+PropertyValue<SymbolAnchorType> SymbolLayer::getTextAnchor() const {
return impl().layout.get<TextAnchor>();
}
-void SymbolLayer::setTextAnchor(DataDrivenPropertyValue<SymbolAnchorType> value) {
+void SymbolLayer::setTextAnchor(PropertyValue<SymbolAnchorType> value) {
if (value == getTextAnchor())
return;
auto impl_ = mutableImpl();
@@ -542,15 +542,15 @@ void SymbolLayer::setTextMaxAngle(PropertyValue<float> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextRotate() {
+PropertyValue<float> SymbolLayer::getDefaultTextRotate() {
return TextRotate::defaultValue();
}
-DataDrivenPropertyValue<float> SymbolLayer::getTextRotate() const {
+PropertyValue<float> SymbolLayer::getTextRotate() const {
return impl().layout.get<TextRotate>();
}
-void SymbolLayer::setTextRotate(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setTextRotate(PropertyValue<float> value) {
if (value == getTextRotate())
return;
auto impl_ = mutableImpl();
@@ -590,15 +590,15 @@ void SymbolLayer::setTextKeepUpright(PropertyValue<bool> value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<TextTransformType> SymbolLayer::getDefaultTextTransform() {
+PropertyValue<TextTransformType> SymbolLayer::getDefaultTextTransform() {
return TextTransform::defaultValue();
}
-DataDrivenPropertyValue<TextTransformType> SymbolLayer::getTextTransform() const {
+PropertyValue<TextTransformType> SymbolLayer::getTextTransform() const {
return impl().layout.get<TextTransform>();
}
-void SymbolLayer::setTextTransform(DataDrivenPropertyValue<TextTransformType> value) {
+void SymbolLayer::setTextTransform(PropertyValue<TextTransformType> value) {
if (value == getTextTransform())
return;
auto impl_ = mutableImpl();
@@ -606,15 +606,15 @@ void SymbolLayer::setTextTransform(DataDrivenPropertyValue<TextTransformType> va
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-DataDrivenPropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextOffset() {
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextOffset() {
return TextOffset::defaultValue();
}
-DataDrivenPropertyValue<std::array<float, 2>> SymbolLayer::getTextOffset() const {
+PropertyValue<std::array<float, 2>> SymbolLayer::getTextOffset() const {
return impl().layout.get<TextOffset>();
}
-void SymbolLayer::setTextOffset(DataDrivenPropertyValue<std::array<float, 2>> value) {
+void SymbolLayer::setTextOffset(PropertyValue<std::array<float, 2>> value) {
if (value == getTextOffset())
return;
auto impl_ = mutableImpl();
@@ -673,15 +673,15 @@ void SymbolLayer::setTextOptional(PropertyValue<bool> value) {
// Paint properties
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultIconOpacity() {
+PropertyValue<float> SymbolLayer::getDefaultIconOpacity() {
return { 1 };
}
-DataDrivenPropertyValue<float> SymbolLayer::getIconOpacity() const {
+PropertyValue<float> SymbolLayer::getIconOpacity() const {
return impl().paint.template get<IconOpacity>().value;
}
-void SymbolLayer::setIconOpacity(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setIconOpacity(PropertyValue<float> value) {
if (value == getIconOpacity())
return;
auto impl_ = mutableImpl();
@@ -700,15 +700,15 @@ TransitionOptions SymbolLayer::getIconOpacityTransition() const {
return impl().paint.template get<IconOpacity>().options;
}
-DataDrivenPropertyValue<Color> SymbolLayer::getDefaultIconColor() {
+PropertyValue<Color> SymbolLayer::getDefaultIconColor() {
return { Color::black() };
}
-DataDrivenPropertyValue<Color> SymbolLayer::getIconColor() const {
+PropertyValue<Color> SymbolLayer::getIconColor() const {
return impl().paint.template get<IconColor>().value;
}
-void SymbolLayer::setIconColor(DataDrivenPropertyValue<Color> value) {
+void SymbolLayer::setIconColor(PropertyValue<Color> value) {
if (value == getIconColor())
return;
auto impl_ = mutableImpl();
@@ -727,15 +727,15 @@ TransitionOptions SymbolLayer::getIconColorTransition() const {
return impl().paint.template get<IconColor>().options;
}
-DataDrivenPropertyValue<Color> SymbolLayer::getDefaultIconHaloColor() {
+PropertyValue<Color> SymbolLayer::getDefaultIconHaloColor() {
return { {} };
}
-DataDrivenPropertyValue<Color> SymbolLayer::getIconHaloColor() const {
+PropertyValue<Color> SymbolLayer::getIconHaloColor() const {
return impl().paint.template get<IconHaloColor>().value;
}
-void SymbolLayer::setIconHaloColor(DataDrivenPropertyValue<Color> value) {
+void SymbolLayer::setIconHaloColor(PropertyValue<Color> value) {
if (value == getIconHaloColor())
return;
auto impl_ = mutableImpl();
@@ -754,15 +754,15 @@ TransitionOptions SymbolLayer::getIconHaloColorTransition() const {
return impl().paint.template get<IconHaloColor>().options;
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultIconHaloWidth() {
+PropertyValue<float> SymbolLayer::getDefaultIconHaloWidth() {
return { 0 };
}
-DataDrivenPropertyValue<float> SymbolLayer::getIconHaloWidth() const {
+PropertyValue<float> SymbolLayer::getIconHaloWidth() const {
return impl().paint.template get<IconHaloWidth>().value;
}
-void SymbolLayer::setIconHaloWidth(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setIconHaloWidth(PropertyValue<float> value) {
if (value == getIconHaloWidth())
return;
auto impl_ = mutableImpl();
@@ -781,15 +781,15 @@ TransitionOptions SymbolLayer::getIconHaloWidthTransition() const {
return impl().paint.template get<IconHaloWidth>().options;
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultIconHaloBlur() {
+PropertyValue<float> SymbolLayer::getDefaultIconHaloBlur() {
return { 0 };
}
-DataDrivenPropertyValue<float> SymbolLayer::getIconHaloBlur() const {
+PropertyValue<float> SymbolLayer::getIconHaloBlur() const {
return impl().paint.template get<IconHaloBlur>().value;
}
-void SymbolLayer::setIconHaloBlur(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setIconHaloBlur(PropertyValue<float> value) {
if (value == getIconHaloBlur())
return;
auto impl_ = mutableImpl();
@@ -862,15 +862,15 @@ TransitionOptions SymbolLayer::getIconTranslateAnchorTransition() const {
return impl().paint.template get<IconTranslateAnchor>().options;
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextOpacity() {
+PropertyValue<float> SymbolLayer::getDefaultTextOpacity() {
return { 1 };
}
-DataDrivenPropertyValue<float> SymbolLayer::getTextOpacity() const {
+PropertyValue<float> SymbolLayer::getTextOpacity() const {
return impl().paint.template get<TextOpacity>().value;
}
-void SymbolLayer::setTextOpacity(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setTextOpacity(PropertyValue<float> value) {
if (value == getTextOpacity())
return;
auto impl_ = mutableImpl();
@@ -889,15 +889,15 @@ TransitionOptions SymbolLayer::getTextOpacityTransition() const {
return impl().paint.template get<TextOpacity>().options;
}
-DataDrivenPropertyValue<Color> SymbolLayer::getDefaultTextColor() {
+PropertyValue<Color> SymbolLayer::getDefaultTextColor() {
return { Color::black() };
}
-DataDrivenPropertyValue<Color> SymbolLayer::getTextColor() const {
+PropertyValue<Color> SymbolLayer::getTextColor() const {
return impl().paint.template get<TextColor>().value;
}
-void SymbolLayer::setTextColor(DataDrivenPropertyValue<Color> value) {
+void SymbolLayer::setTextColor(PropertyValue<Color> value) {
if (value == getTextColor())
return;
auto impl_ = mutableImpl();
@@ -916,15 +916,15 @@ TransitionOptions SymbolLayer::getTextColorTransition() const {
return impl().paint.template get<TextColor>().options;
}
-DataDrivenPropertyValue<Color> SymbolLayer::getDefaultTextHaloColor() {
+PropertyValue<Color> SymbolLayer::getDefaultTextHaloColor() {
return { {} };
}
-DataDrivenPropertyValue<Color> SymbolLayer::getTextHaloColor() const {
+PropertyValue<Color> SymbolLayer::getTextHaloColor() const {
return impl().paint.template get<TextHaloColor>().value;
}
-void SymbolLayer::setTextHaloColor(DataDrivenPropertyValue<Color> value) {
+void SymbolLayer::setTextHaloColor(PropertyValue<Color> value) {
if (value == getTextHaloColor())
return;
auto impl_ = mutableImpl();
@@ -943,15 +943,15 @@ TransitionOptions SymbolLayer::getTextHaloColorTransition() const {
return impl().paint.template get<TextHaloColor>().options;
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextHaloWidth() {
+PropertyValue<float> SymbolLayer::getDefaultTextHaloWidth() {
return { 0 };
}
-DataDrivenPropertyValue<float> SymbolLayer::getTextHaloWidth() const {
+PropertyValue<float> SymbolLayer::getTextHaloWidth() const {
return impl().paint.template get<TextHaloWidth>().value;
}
-void SymbolLayer::setTextHaloWidth(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setTextHaloWidth(PropertyValue<float> value) {
if (value == getTextHaloWidth())
return;
auto impl_ = mutableImpl();
@@ -970,15 +970,15 @@ TransitionOptions SymbolLayer::getTextHaloWidthTransition() const {
return impl().paint.template get<TextHaloWidth>().options;
}
-DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextHaloBlur() {
+PropertyValue<float> SymbolLayer::getDefaultTextHaloBlur() {
return { 0 };
}
-DataDrivenPropertyValue<float> SymbolLayer::getTextHaloBlur() const {
+PropertyValue<float> SymbolLayer::getTextHaloBlur() const {
return impl().paint.template get<TextHaloBlur>().value;
}
-void SymbolLayer::setTextHaloBlur(DataDrivenPropertyValue<float> value) {
+void SymbolLayer::setTextHaloBlur(PropertyValue<float> value) {
if (value == getTextHaloBlur())
return;
auto impl_ = mutableImpl();
diff --git a/src/mbgl/style/layout_property.hpp b/src/mbgl/style/layout_property.hpp
index 8c59295ad2..0fcad30cc4 100644
--- a/src/mbgl/style/layout_property.hpp
+++ b/src/mbgl/style/layout_property.hpp
@@ -1,7 +1,6 @@
#pragma once
#include <mbgl/style/property_value.hpp>
-#include <mbgl/style/data_driven_property_value.hpp>
#include <mbgl/renderer/property_evaluator.hpp>
#include <mbgl/renderer/data_driven_property_evaluator.hpp>
@@ -23,7 +22,7 @@ template <class T>
class DataDrivenLayoutProperty {
public:
using TransitionableType = std::nullptr_t;
- using UnevaluatedType = DataDrivenPropertyValue<T>;
+ using UnevaluatedType = PropertyValue<T>;
using EvaluatorType = DataDrivenPropertyEvaluator<T>;
using PossiblyEvaluatedType = PossiblyEvaluatedPropertyValue<T>;
using Type = T;
diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp
index d51a6760c5..3d9d7710dc 100644
--- a/src/mbgl/style/paint_property.hpp
+++ b/src/mbgl/style/paint_property.hpp
@@ -3,7 +3,6 @@
#include <mbgl/style/color_ramp_property_value.hpp>
#include <mbgl/style/properties.hpp>
#include <mbgl/style/property_value.hpp>
-#include <mbgl/style/data_driven_property_value.hpp>
#include <mbgl/renderer/property_evaluator.hpp>
#include <mbgl/renderer/cross_faded_property_evaluator.hpp>
#include <mbgl/renderer/data_driven_property_evaluator.hpp>
@@ -27,8 +26,8 @@ public:
template <class T, class A, class U>
class DataDrivenPaintProperty {
public:
- using TransitionableType = Transitionable<DataDrivenPropertyValue<T>>;
- using UnevaluatedType = Transitioning<DataDrivenPropertyValue<T>>;
+ using TransitionableType = Transitionable<PropertyValue<T>>;
+ using UnevaluatedType = Transitioning<PropertyValue<T>>;
using EvaluatorType = DataDrivenPropertyEvaluator<T>;
using PossiblyEvaluatedType = PossiblyEvaluatedPropertyValue<T>;
using Type = T;
@@ -67,7 +66,7 @@ public:
using PossiblyEvaluatedType = Color;
using Type = Color;
static constexpr bool IsDataDriven = false;
-
+
static Color defaultValue() { return {}; }
};