resetFeatureStates

fun resetFeatureStates(sourceId: String, sourceLayerId: String? = null, callback: FeatureStateOperationCallback): Cancelable

Reset all the feature states within a style source.

Remove all feature state entries from the specified style source or source layer.

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

Return

A cancelable object that could be used to cancel the pending operation.

Parameters

sourceId

The style source identifier.

sourceLayerId

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

callback

The feature state operation callback called when the operation completes or ends.


fun resetFeatureStates(descriptor: TypedFeaturesetDescriptor<*, *>, callback: FeatureStateOperationCallback = FeatureStateOperationCallback { }): Cancelable

Reset all the feature states within a style source.

Remove all feature state entries from the specified style source or source layer.

Note that updates to feature state are asynchronous, so changes made by this method might not be immediately visible using getFeatureState.

Return

A Cancelable object that could be used to cancel the pending operation.

Parameters

descriptor

TypedFeaturesetDescriptor object representing either a featureset or a single layer.

callback

The FeatureStateOperationCallback called when the operation completes or ends.