summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/possibly_evaluated_property_value.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/renderer/possibly_evaluated_property_value.hpp')
-rw-r--r--src/mbgl/renderer/possibly_evaluated_property_value.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mbgl/renderer/possibly_evaluated_property_value.hpp b/src/mbgl/renderer/possibly_evaluated_property_value.hpp
index 625235011c..1198e43aae 100644
--- a/src/mbgl/renderer/possibly_evaluated_property_value.hpp
+++ b/src/mbgl/renderer/possibly_evaluated_property_value.hpp
@@ -49,6 +49,14 @@ public:
}
);
}
+
+ template <class Feature>
+ T evaluate(const Feature& feature, float zoom, const FeatureState& featureState, T defaultValue) const {
+ return this->match([&](const T& constant_) { return constant_; },
+ [&](const style::PropertyExpression<T>& expression) {
+ return expression.evaluate(zoom, feature, featureState, defaultValue);
+ });
+ }
};
template <class T>