addSymbolLayer method
Renders a symbol layer (icons/text) from the provided GeoJSON source.
Implementation
Future<void> addSymbolLayer(
String sourceId, {
String layerId = 'pm-symbol-layer',
dynamic iconImage,
dynamic textField,
dynamic textColor = '#000000',
dynamic filter,
}) async {
await mapController.addSymbolLayer(
sourceId,
layerId,
SymbolLayerProperties(
iconImage: iconImage,
textField: textField,
textColor: textColor,
textAnchor: 'top',
textOffset: const [0, 1.5],
textSize: 12.0,
),
filter: filter,
);
}