From e895cdd63520a4a5e83768c19e87bd1445f926e1 Mon Sep 17 00:00:00 2001 From: Andrea Valenzano Date: Tue, 11 May 2021 22:47:06 +0200 Subject: [PATCH] [web] add missing removeLines removeCircles and removeFills (#622) --- .../lib/src/mapbox_map_controller.dart | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/maplibre_gl_web/lib/src/mapbox_map_controller.dart b/maplibre_gl_web/lib/src/mapbox_map_controller.dart index caa29e013..91e35a509 100644 --- a/maplibre_gl_web/lib/src/mapbox_map_controller.dart +++ b/maplibre_gl_web/lib/src/mapbox_map_controller.dart @@ -196,7 +196,12 @@ class MaplibreMapController extends MapLibreGlPlatform } @override - Future addCircle(CircleOptions options, [Map data]) async { + Future removeLines(Iterable ids) async { + lineManager.removeAll(ids); + } + + @override + Future addCircle(CircleOptions options, [Map? data]) async { String circleId = circleManager.add(Feature( geometry: Geometry( type: 'Point', @@ -223,7 +228,12 @@ class MaplibreMapController extends MapLibreGlPlatform circleManager.remove(circleId); } - Future addFill(FillOptions options, [Map data]) async { + @override + Future removeCircles(Iterable ids) async { + circleManager.removeAll(ids); + } + + Future addFill(FillOptions options, [Map? data]) async { String fillId = fillManager.add(Feature( geometry: Geometry( type: 'Polygon', @@ -243,6 +253,11 @@ class MaplibreMapController extends MapLibreGlPlatform fillManager.remove(fillId); } + @override + Future removeFills(Iterable ids) async { + fillManager.removeAll(ids); + } + @override Future queryRenderedFeatures( Point point, List layerIds, List filter) async {