addLayer method
Implementation
Future<void> addLayer(
String sourceId, String layerId, LayerProperties properties,
{String? belowLayerId,
bool enableInteraction = true,
String? sourceLayer}) async {
if (properties is FillLayerProperties) {
addFillLayer(sourceId, layerId, properties,
belowLayerId: belowLayerId, sourceLayer: sourceLayer);
} else if (properties is LineLayerProperties) {
addLineLayer(sourceId, layerId, properties,
belowLayerId: belowLayerId, sourceLayer: sourceLayer);
} else if (properties is SymbolLayerProperties) {
addSymbolLayer(sourceId, layerId, properties,
belowLayerId: belowLayerId, sourceLayer: sourceLayer);
} else if (properties is CircleLayerProperties) {
addCircleLayer(sourceId, layerId, properties,
belowLayerId: belowLayerId, sourceLayer: sourceLayer);
} else if (properties is RasterLayerProperties) {
addRasterLayer(sourceId, layerId, properties,
belowLayerId: belowLayerId, sourceLayer: sourceLayer);
} else if (properties is HillshadeLayerProperties) {
addHillshadeLayer(sourceId, layerId, properties,
belowLayerId: belowLayerId, sourceLayer: sourceLayer);
} else {
throw UnimplementedError("Unknown layer type $properties");
}
}