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)

Functions

component1
Link copied to clipboard
operator fun component1(): Boolean
component10
Link copied to clipboard
operator fun component10(): Long
component11
Link copied to clipboard
operator fun component11(): List<Pair<Int, Int>>
component12
Link copied to clipboard
operator fun component12(): HashMap<String, Any>?
component2
Link copied to clipboard
operator fun component2(): Long
component3
Link copied to clipboard
operator fun component3(): Value?
component4
Link copied to clipboard
operator fun component4(): Double
component5
Link copied to clipboard
operator fun component5(): Value?
component6
Link copied to clipboard
operator fun component6(): Int
component7
Link copied to clipboard
operator fun component7(): Value?
component8
Link copied to clipboard
operator fun component8(): Double
component9
Link copied to clipboard
operator fun component9(): Value?
copy
Link copied to clipboard
fun copy(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): ClusterOptions
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

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.