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 #622

Merged
merged 1 commit into from
May 11, 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 mapbox_gl_web/lib/src/mapbox_map_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ class MapboxMapController extends MapboxGlPlatform
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 @@ -222,6 +227,11 @@ class MapboxMapController extends MapboxGlPlatform
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 @@ -242,6 +252,11 @@ class MapboxMapController extends MapboxGlPlatform
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