diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2019-08-21 16:21:46 +0300 |
---|---|---|
committer | Juha Alanen <19551460+jmalanen@users.noreply.github.com> | 2019-09-18 14:29:15 +0300 |
commit | 75d18e32fce61f4c20cc2fe78d4cdf5eb357ccca (patch) | |
tree | a75a88058a4f917ac2adaf1f5e381ca3aae98fcd /include/mbgl/style/property_expression.hpp | |
parent | e51fafd4ebab154472e8d00a8b16a374728f0863 (diff) | |
download | qtlocation-mapboxgl-75d18e32fce61f4c20cc2fe78d4cdf5eb357ccca.tar.gz |
[core] Add feature state support to expression
Diffstat (limited to 'include/mbgl/style/property_expression.hpp')
-rw-r--r-- | include/mbgl/style/property_expression.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/style/property_expression.hpp b/include/mbgl/style/property_expression.hpp index 32983e2380..f68285fb1b 100644 --- a/include/mbgl/style/property_expression.hpp +++ b/include/mbgl/style/property_expression.hpp @@ -61,6 +61,10 @@ public: return evaluate(expression::EvaluationContext(zoom, &feature), finalDefaultValue); } + T evaluate(float zoom, const GeometryTileFeature& feature, const FeatureState& state, T finalDefaultValue) const { + return evaluate(expression::EvaluationContext(zoom, &feature, &state), finalDefaultValue); + } + std::vector<optional<T>> possibleOutputs() const { return expression::fromExpressionValues<T>(expression->possibleOutputs()); } |