getLayer(
id:string):StyleLayer
Defined in: ui/map.ts:3596
Returns the layer with the specified ID in the map's style.
Parameters
| Parameter | Type | Description |
|---|---|---|
id |
string |
The ID of the layer to get. |
Returns
StyleLayer
The layer with the specified ID, or undefined
if the ID corresponds to no existing layers.
Example
let stateDataLayer = map.getLayer('state-data');
See
- Filter symbols by toggling a list
- Filter symbols by text input