removeFeatureState

fun removeFeatureState(sourceLayerId: String, featureId: String?, stateKey: String?): Boolean(source)

Removes state from a feature in this source, or from all features in a source layer when featureId is null.

Return

true if the source is attached to a map and the update was dispatched

Parameters

sourceLayerId

the source layer id

featureId

the id of the feature, or null to target all features

stateKey

the state key to remove, or null to remove all keys


fun removeFeatureState(sourceLayerId: String, featureId: String): Boolean(source)

Removes all state from a single feature in this source.

Return

true if the source is attached to a map and the update was dispatched

Parameters

sourceLayerId

the source layer id

featureId

the id of the feature