Package-level declarations

Functions

Link copied to clipboard

Load a new style from a style extension, suspends until style is loaded.

suspend fun MapboxMap.awaitLoadStyle(style: String): Style

Load a new style from a style URI or JSON, suspends until style is loaded.

Link copied to clipboard
suspend fun MapboxMap.awaitStyle(): Style

Get the Style of the map.

Link copied to clipboard
suspend fun MapboxMap.cameraForCoordinates(coordinates: List<Point>, camera: CameraOptions, coordinatesPadding: EdgeInsets? = null, maxZoom: Double? = null, offset: ScreenCoordinate? = null): CameraOptions

Convenience method that returns the CameraOptions object for given parameters.

Link copied to clipboard
Link copied to clipboard
suspend fun MapboxMap.getFeatureState(sourceId: String, sourceLayerId: String? = null, featureId: String): Expected<String, Value>

Get the state map of a feature within a style source.

Link copied to clipboard
suspend fun MapboxMap.getGeoJsonClusterChildren(sourceIdentifier: String, cluster: Feature): Expected<String, FeatureExtensionValue>

Returns the children (original points or clusters) of a cluster (on the next zoom level) given its id (cluster_id value from feature properties) from a GeoJsonSource.

Link copied to clipboard
suspend fun MapboxMap.getGeoJsonClusterExpansionZoom(sourceIdentifier: String, cluster: Feature): Expected<String, FeatureExtensionValue>

Returns the zoom on which the cluster expands into several children (useful for "click to zoom" feature) given the cluster's cluster_id (cluster_id value from feature properties) from a GeoJsonSource.

Link copied to clipboard
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).

Link copied to clipboard

Queries the map for rendered features.

Link copied to clipboard

Queries the map for source features.

Link copied to clipboard
suspend fun MapboxMap.removeFeatureState(sourceId: String, sourceLayerId: String? = null, featureId: String, stateKey: String? = null): Expected<String, None>

Removes entries from a feature state object.

Link copied to clipboard
suspend fun MapboxMap.resetFeatureStates(sourceId: String, sourceLayerId: String? = null): Expected<String, None>

Reset all the feature states within a style source.

Link copied to clipboard
suspend fun MapboxMap.setFeatureState(sourceId: String, sourceLayerId: String? = null, featureId: String, state: Value): Expected<String, None>

Updates the state object of a feature within a style source.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard