addLayer method

dynamic addLayer(
  1. dynamic layerObject, [
  2. String? before,
  3. StyleSetterOptions? options
])

Add a layer to the map style. The layer will be inserted before the layer with ID before, or appended if before is omitted. @param {string} before ID of an existing layer to insert before

Implementation

addLayer(dynamic layerObject, [String? before, StyleSetterOptions? options]) =>
    jsObject.addLayer(layerObject);