Skip to content

Commit

Permalink
[web] add missing removeLines removeCircles and removeFills (#622) (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Valenzano <andr3a689@gmail.com>
  • Loading branch information
m0nac0 and andrea689 committed Oct 26, 2021
1 parent 2a37ff7 commit 7a38734
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions maplibre_gl_web/lib/src/mapbox_map_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ class MaplibreMapController extends MapLibreGlPlatform
lineManager.remove(lineId);
}

@override
Future<void> removeLines(Iterable<String> ids) async {
lineManager.removeAll(ids);
}

@override
Future<Circle> addCircle(CircleOptions options, [Map? data]) async {
String circleId = circleManager.add(Feature(
Expand Down Expand Up @@ -220,6 +225,11 @@ class MaplibreMapController extends MapLibreGlPlatform
circleManager.remove(circleId);
}

@override
Future<void> removeCircles(Iterable<String> ids) async {
circleManager.removeAll(ids);
}

Future<Fill> addFill(FillOptions options, [Map? data]) async {
String fillId = fillManager.add(Feature(
geometry: Geometry(
Expand All @@ -240,6 +250,11 @@ class MaplibreMapController extends MapLibreGlPlatform
fillManager.remove(fillId);
}

@override
Future<void> removeFills(Iterable<String> ids) async {
fillManager.removeAll(ids);
}

@override
Future<List> queryRenderedFeatures(
Point<double> point, List<String> layerIds, List<Object>? filter) async {
Expand Down

0 comments on commit 7a38734

Please sign in to comment.