summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/expression.cpp
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2019-08-16 15:03:48 +0300
committerGitHub <noreply@github.com>2019-08-16 15:03:48 +0300
commit0f34eb7b253e83b8c4aef7ed6c83cd7b3801fa4c (patch)
treea0e06d1c81b04fca84f8ed8effeaeaefc2e79e13 /src/mbgl/style/expression/expression.cpp
parent9f8696c00c7ef11abb3850e4694bc7375365295e (diff)
downloadqtlocation-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 'src/mbgl/style/expression/expression.cpp')
-rw-r--r--src/mbgl/style/expression/expression.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/style/expression/expression.cpp b/src/mbgl/style/expression/expression.cpp
index d61f435eec..6bfda99064 100644
--- a/src/mbgl/style/expression/expression.cpp
+++ b/src/mbgl/style/expression/expression.cpp
@@ -25,13 +25,17 @@ public:
return optional<mbgl::Value>();
}
};
-
-
+
EvaluationResult Expression::evaluate(optional<float> zoom, const Feature& feature, optional<double> colorRampParameter) const {
GeoJSONFeature f(feature);
return this->evaluate(EvaluationContext(zoom, &f, colorRampParameter));
}
+EvaluationResult Expression::evaluate(optional<mbgl::Value> accumulated, const Feature& feature) const {
+ GeoJSONFeature f(feature);
+ return this->evaluate(EvaluationContext(accumulated, &f));
+}
+
} // namespace expression
} // namespace style
} // namespace mbgl