setFeatureState

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

Update entries in the state map of a given feature within a style source. Only entries listed in the \p state map will be updated. An entry in the feature state map that is not listed in \p state will retain its previous value.

Note that updates to feature state are asynchronous, so changes made by this method migth not be immediately visible using getStateFeature().

Parameters

featureId

Identifier of the feature whose state should be updated.

sourceId

Style source identifier.

sourceLayerId

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

state

Map of entries to update with their respective new values.

fun setFeatureState(sourceId: String, sourceLayerId: String?, featureId: String, state: Value)