rasterLayers property

Future<List<RasterDataLayer?>?> get rasterLayers

Contains the description of the raster data layers and the bands contained within the tiles.

Implementation

Future<List<RasterDataLayer?>?> get rasterLayers async {
  return _style?.getStyleSourceProperty(id, "rasterLayers").then((value) {
    if (value.value != null) {
      return (value.value as Map<Object?, Object?>).entries.map((entry) {
        return RasterDataLayer(
            entry.key as String, (entry.value as List).cast<String>());
      }).toList();
    } else {
      return null;
    }
  });
}