getGeoJsonClusterLeaves

suspend fun MapboxMap.getGeoJsonClusterLeaves(sourceIdentifier: String, cluster: Feature, limit: Long, offset: Long): Expected<String, FeatureExtensionValue>

Returns all the leaves (original points) of a cluster (given its cluster_id) from a GeoJsonSource, with pagination support: limit is the number of leaves to return (set to Infinity for all points), and offset is the amount of points to skip (for pagination).

Requires configuring the source as a cluster by calling GeoJsonSource.Builder#cluster(boolean).

Return

a feature collection or a string describing an error.

Parameters

sourceIdentifier

GeoJsonSource identifier.

cluster

Cluster from which to retrieve leaves from.

limit

The number of points to return from the query (must use type Long, set to maximum for all points). Defaults to 10.

offset

The amount of points to skip (for pagination, must use type Long). Defaults to 0.