set Feature State
fun setFeatureState(sourceId: String, sourceLayerId: String? = null, featureId: String, state: Value)
Content copied to clipboard
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 might not be immediately visible using getStateFeature().
Parameters
source Id
Style source identifier.
source Layer Id
Style source layer identifier (for multi-layer sources such as vector sources).
feature Id
Identifier of the feature whose state should be updated.
state
Map of entries to update with their respective new values.