cluster

val cluster: Boolean = true

If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new Point features in the source with additional properties:

  • cluster Is true if the point is a cluster

  • cluster_id A unique id for the cluster to be used in conjunction with the cluster inspection methods(https://docs.mapbox.com/mapbox-gl-js/api/sources/#geojsonsource#getclusterexpansionzoom, https://docs.mapbox.com/mapbox-gl-js/api/sources/#geojsonsource#getclusterchildren, https://docs.mapbox.com/mapbox-gl-js/api/sources/#geojsonsource#getclusterleaves)

  • point_count Number of original points grouped into this cluster

  • point_count_abbreviated An abbreviated point count