ClusterOptions

data class ClusterOptions @JvmOverloads() constructor(cluster: Boolean, clusterRadius: Long, circleRadiusExpression: Value?, circleRadius: Double, textColorExpression: Value?, textColor: Int, textSizeExpression: Value?, textSize: Double, textField: Value?, clusterMaxZoom: Long, colorLevels: List<Pair<Int, Int>>, clusterProperties: HashMap<String, Any>?)

Options to show and configure symbol clustering with using SymbolManager.

It exposes a minimal of configuration options, a more advanced setup can be created manually with using CircleLayer and SymbolLayers directly.

Constructors

ClusterOptions
Link copied to clipboard
fun ClusterOptions(cluster: Boolean = true, clusterRadius: Long = 50, circleRadiusExpression: Value? = null, circleRadius: Double = 18.0, textColorExpression: Value? = null, textColor: Int = Color.WHITE, textSizeExpression: Value? = null, textSize: Double = 12.0, textField: Value? = null, clusterMaxZoom: Long = 14, colorLevels: List<Pair<Int, Int>> = listOf(Pair(0, Color.BLUE)), clusterProperties: HashMap<String, Any>? = null)

Properties

circleRadius
Link copied to clipboard
val circleRadius: Double = 18.0
The circle radius of the cluster items in expression, literal(18) by default
circleRadiusExpression
Link copied to clipboard
val circleRadiusExpression: Value? = null
The circle radius of the cluster items in expression.
cluster
Link copied to clipboard
val cluster: Boolean = true
If the data is a collection of point features, setting this to true clusters the points by radius into groups.
clusterMaxZoom
Link copied to clipboard
val clusterMaxZoom: Long = 14
Max zoom on which to cluster points if clustering is enabled.
clusterProperties
Link copied to clipboard
val clusterProperties: HashMap<String, Any>? = null
An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points.
clusterRadius
Link copied to clipboard
val clusterRadius: Long = 50
Radius of each cluster if clustering is enabled.
colorLevels
Link copied to clipboard
val colorLevels: List<Pair<Int, Int>>
The cluster color levels, which a pair constructed with amount of point and a int color value.
textColor
Link copied to clipboard
val textColor: Int
The text color of cluster item in expression.
textColorExpression
Link copied to clipboard
val textColorExpression: Value? = null
The text color of cluster item in expression.
textField
Link copied to clipboard
val textField: Value? = null
The text field of a cluster item in expression.
textSize
Link copied to clipboard
val textSize: Double = 12.0
The text size of cluster item in expression.
textSizeExpression
Link copied to clipboard
val textSizeExpression: Value? = null
The text size of cluster item in expression.