addLayer abstract method

Future<void> addLayer(
  1. StyleLayer layer, {
  2. String? belowLayerId,
})

Add a new layer to the map. The source must be added before adding it to the map.

belowLayerId The ID of an existing layer to insert the new layer before, resulting in the new layer appearing visually beneath the existing layer. If this argument is not specified, the layer will be appended to the end of the layers array and appear visually above all other layers.

Implementation

Future<void> addLayer(StyleLayer layer, {String? belowLayerId});