addSymbols method
Adds multiple symbols to the map, configured using the specified custom
options
.
Change listeners are notified once the symbol has been added on the platform side.
The returned Future completes with the added symbol once listeners have been notified.
Implementation
Future<List<Symbol>> addSymbols(List<SymbolOptions> options,
[List<Map>? data]) async {
final List<SymbolOptions> effectiveOptions =
options.map((o) => SymbolOptions.defaultOptions.copyWith(o)).toList();
final symbols = await MapboxFlutterPlatfom.getInstance(_id)
.addSymbols(effectiveOptions, data);
symbols.forEach((s) => _symbols[s.id] = s);
notifyListeners();
return symbols;
}