withClusterProperty

fun withClusterProperty(propertyName: String, operatorExpr: Expression, mapExpr: Expression): GeoJsonOptions

An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form {"property_name": [operator, map_expression]} or {"property_name": [operator, accumulated, expression, map_expression]}

Return

the current instance for chaining

Parameters

propertyName

name of the property

operatorExpr

operatorExpr is any expression function that accepts at least 2 operands (e.g. "+" or "max"). It accumulates the property value from clusters/points the cluster contains. It can either be a literal with single operator, or be a valid expression

mapExpr

map expression produces the value of a single point, it shall be a valid expression