Skip to content

gi-nx


gi-nx / getFeatureState

ts
function getFeatureState(__namedParameters: {
  id: string | number;
  source: string;
  sourceLayer?: string;
}): FeatureState;

Get the current state of a Mapbox GL feature. This applies to features on Mapbox sources/layers, not Giraffe RawSections.

Parameters

ParameterType
__namedParameters.idstring | number
__namedParameters.sourcestring
__namedParameters.sourceLayer?string

Returns

FeatureState

The state of the feature: a set of key-value pairs that was assigned to the feature at runtime.

See

https://docs.mapbox.com/mapbox-gl-js/api/map/#map#getfeaturestate