Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] add missing removeLines, removeCircles and removeFills (cherry-pick tobrun#622) #32

Merged
merged 2 commits into from
Oct 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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