summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2019-08-22 18:54:31 +0300
committerGitHub <noreply@github.com>2019-08-22 18:54:31 +0300
commit2a8359b0280e861450f9bdf390a01e0363202b3a (patch)
tree45787259e7f16199688f212f69a10c89dd2089cb /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
parent4a5475b1c63843f35ac26ba3a17d58022c9b2777 (diff)
downloadqtlocation-mapboxgl-2a8359b0280e861450f9bdf390a01e0363202b3a.tar.gz
[android] bindings for aggregated cluster properties (#15425)
* [android] bindings for aggregated cluster properties * [android] change the parameter type for adding clusterProperty * [android] add changelog * remove extra emplty line
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
index 0f5ce76725..d6cddea066 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
@@ -1436,6 +1436,27 @@ public class Expression {
}
/**
+ * Gets the value of a cluster property accumulated so far. Can only be used in the clusterProperties
+ * option of a clustered GeoJSON source.
+ * <p>
+ * Example usage:
+ * </p>
+ * <pre>
+ * {@code
+ * GeoJsonOptions options = new GeoJsonOptions()
+ * .withCluster(true)
+ * .withClusterProperty("max", max(accumulated(), get("max")).toArray(), get("mag").toArray());
+ * }
+ * </pre>
+ *
+ * @return expression
+ * @see <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-accumulated">Style specification</a>
+ */
+ public static Expression accumulated() {
+ return new Expression("accumulated");
+ }
+
+ /**
* Gets the kernel density estimation of a pixel in a heatmap layer,
* which is a relative measure of how many data points are crowded around a particular pixel.
* Can only be used in the `heatmap-color` property.