addCircles method

Future<List<Circle>> addCircles(
  1. List<CircleOptions> options, [
  2. List<Map>? data
])

Adds multiple circles to the map, configured using the specified custom options.

Change listeners are notified once the circles have been added on the platform side.

The returned Future completes with the added circle once listeners have been notified.

Implementation

Future<List<Circle>> addCircles(List<CircleOptions> options,
    [List<Map>? data]) async {
  final circles = await _mapboxGlPlatform.addCircles(options, data);
  circles.forEach((c) => _circles[c.id] = c);
  notifyListeners();
  return circles;
}