diff options
Diffstat (limited to 'src/mbgl/renderer/possibly_evaluated_property_value.hpp')
-rw-r--r-- | src/mbgl/renderer/possibly_evaluated_property_value.hpp | 10 |
1 files changed, 10 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..2e47e6c854 100644 --- a/src/mbgl/renderer/possibly_evaluated_property_value.hpp +++ b/src/mbgl/renderer/possibly_evaluated_property_value.hpp @@ -49,6 +49,16 @@ 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> |