removeFeatureState method

dynamic removeFeatureState(
  1. dynamic target, [
  2. String? key
])

Removes feature state, setting it back to the default behavior. If only source is specified, removes all states of that source. If target.id is also specified, removes all keys for that feature's state. If key is also specified, removes that key from that feature's state. Features are identified by their id attribute, which must be an integer or a string that can be cast to an integer. @param {Object} target Identifier of where to set state: can be a source, a feature, or a specific key of feature. Feature objects returned from {@link MapboxMap#queryRenderedFeatures} or event handlers can be used as feature identifiers. @param {string | number} target.id (optional) Unique id of the feature. Optional if key is not specified. @param {string} target.source The Id of the vector source or GeoJSON source for the feature. @param {string} target.sourceLayer (optional) /// For vector tile sources, the sourceLayer is required.* @param {string} key (optional) The key in the feature state to reset.

Implementation

removeFeatureState(dynamic target, [String? key]) =>
    jsObject.removeFeatureState(target);