gi-nx / setFeatureState
ts
function setFeatureState(__namedParameters: {
id: string | number;
source: string;
sourceLayer?: string;
}, props: Record<string, any>): void;Set arbitrary state on a Mapbox GL feature. This applies to features on Mapbox sources/layers (e.g. tilesets, GeoJSON sources), not Giraffe RawSections. To modify Giraffe features, use updateRawSection instead.
Parameters
| Parameter | Type |
|---|---|
__namedParameters.id | string | number |
__namedParameters.source | string |
__namedParameters.sourceLayer? | string |
props | Record<string, any> |
Returns
void
See
https://docs.mapbox.com/mapbox-gl-js/api/map/#map#setfeaturestate