set Feature State
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.
Update entries in the state object of a given feature within a style source. Only properties of the state object will be updated. A property in the feature state object that is not listed in state will retain its previous value. The properties must be paint properties, layout properties are not supported.
Return
None or a string describing an error.
Parameters
source Id
The style source identifier.
source Layer Id
The style source layer identifier (for multi-layer sources such as vector sources).
feature Id
The feature identifier of the feature whose state should be updated.
state
The state object with properties to update with their respective new values.