addRasterLayer method

Future<void> addRasterLayer(
  1. String sourceId,
  2. String layerId,
  3. RasterLayerProperties properties, {
  4. String? belowLayerId,
  5. String? sourceLayer,
  6. double? minzoom,
  7. double? maxzoom,
})

Add a raster layer to the map with the given properties

Consider using addLayer for an unified layer api.

The returned Future completes after the change has been made on the platform side.

Setting belowLayerId adds the new layer below the given id. sourceLayer is used to selected a specific source layer from Raster source. minzoom is the minimum (inclusive) zoom level at which the layer is visible. maxzoom is the maximum (exclusive) zoom level at which the layer is visible.

Implementation

Future<void> addRasterLayer(
    String sourceId, String layerId, RasterLayerProperties properties,
    {String? belowLayerId,
    String? sourceLayer,
    double? minzoom,
    double? maxzoom}) async {
  await _vietmapGLPlatform.addRasterLayer(
    sourceId,
    layerId,
    properties.toJson(),
    belowLayerId: belowLayerId,
    sourceLayer: sourceLayer,
    minzoom: minzoom,
    maxzoom: maxzoom,
  );
}