getLayer method

dynamic getLayer(
  1. String id
)

Returns the layer with the specified ID in the map's style.

@param {string} id The ID of the layer to get. @returns {?Object} The layer with the specified ID, or undefined if the ID corresponds to no existing layers.

@example var stateDataLayer = map.getLayer('state-data');

@see Filter symbols by toggling a list @see Filter symbols by text input

Implementation

dynamic getLayer(String id) => jsObject.getLayer(id);