diff options
author | zmiao <miao.zhao@mapbox.com> | 2019-08-16 15:03:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-16 15:03:48 +0300 |
commit | 0f34eb7b253e83b8c4aef7ed6c83cd7b3801fa4c (patch) | |
tree | a0e06d1c81b04fca84f8ed8effeaeaefc2e79e13 /include/mbgl/style/expression/expression.hpp | |
parent | 9f8696c00c7ef11abb3850e4694bc7375365295e (diff) | |
download | qtlocation-mapboxgl-0f34eb7b253e83b8c4aef7ed6c83cd7b3801fa4c.tar.gz |
Indroduce clusterProperty option for aggregation (#15287)
* indroduce clusterProperty option for aggregation
* remove unnecessary codes
* update geojson_option conversion
* fix reviewing findings
Diffstat (limited to 'include/mbgl/style/expression/expression.hpp')
-rw-r--r-- | include/mbgl/style/expression/expression.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mbgl/style/expression/expression.hpp b/include/mbgl/style/expression/expression.hpp index 5f66fc6dc7..ad57748677 100644 --- a/include/mbgl/style/expression/expression.hpp +++ b/include/mbgl/style/expression/expression.hpp @@ -31,6 +31,9 @@ public: EvaluationContext(float zoom_, GeometryTileFeature const * feature_) : zoom(zoom_), feature(feature_) {} + EvaluationContext(optional<mbgl::Value> accumulated_, GeometryTileFeature const * feature_) : + accumulated(std::move(accumulated_)), feature(feature_) + {} EvaluationContext(optional<float> zoom_, GeometryTileFeature const * feature_, optional<double> colorRampParameter_) : zoom(std::move(zoom_)), feature(feature_), colorRampParameter(std::move(colorRampParameter_)) {} @@ -41,6 +44,7 @@ public: }; optional<float> zoom; + optional<mbgl::Value> accumulated; GeometryTileFeature const * feature = nullptr; optional<double> colorRampParameter; // Contains formatted section object, std::unordered_map<std::string, Value>. @@ -162,7 +166,7 @@ public: type::Type getType() const { return type; }; EvaluationResult evaluate(optional<float> zoom, const Feature& feature, optional<double> colorRampParameter) const; - + EvaluationResult evaluate(optional<mbgl::Value> accumulated, const Feature& feature) const; /** * Statically analyze the expression, attempting to enumerate possible outputs. Returns * an array of values plus the sentinel null optional value, used to indicate that the |