replaceMarkers method

Future<void> replaceMarkers(
  1. List<FlutterMarker> markers
)

Clears all of the markers on the map, and adds given markers.

The returned Future completes after the change has been made on the platform side.

Implementation

Future<void> replaceMarkers(List<FlutterMarker> markers) async {
  await channel.invokeMethod<void>('markers#replace', <String, dynamic>{
    'markerList': markers.map((e) => e.serialize()).toList(),
  });
}