addLayer method
- Layer layer, [
- LayerPosition? position
Adds a Layer to the current style. Serializes the layer to JSON and forwards to StylePlatformInterface.addStyleLayer.
Implementation
Future<void> addLayer(Layer layer, [LayerPosition? position]) async {
final encoded = await layer.encode();
return _impl.addStyleLayer(encoded, null);
}