getFeatureState

fun getFeatureState(sourceId: String, sourceLayerId: String? = null, featureId: String, callback: QueryFeatureStateCallback)

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

Note that updates to feature state are asynchronous, so changes made by other methods might not be immediately visible.

Return

Feature's state map or an empty map if the feature could not be found.

Parameters

sourceId

Style source identifier.

sourceLayerId

Style source layer identifier (for multi-layer sources such as vector sources).

featureId

Identifier of the feature whose state should be queried.