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

Fix docs for querySourceFeatures #347

Merged
merged 3 commits into from
Jan 11, 2024
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
10 changes: 7 additions & 3 deletions lib/src/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1064,20 +1064,24 @@ class MaplibreMapController extends ChangeNotifier {
notifyListeners();
}

/// Query rendered features at a point in screen cooridnates
/// Query rendered (i.e. visible) features at a point in screen coordinates
Future<List> queryRenderedFeatures(
Point<double> point, List<String> layerIds, List<Object>? filter) async {
return _maplibreGlPlatform.queryRenderedFeatures(point, layerIds, filter);
}

/// Query rendered features in a Rect in screen coordinates
/// Query rendered (i.e. visible) features in a Rect in screen coordinates
Future<List> queryRenderedFeaturesInRect(
Rect rect, List<String> layerIds, String? filter) async {
return _maplibreGlPlatform.queryRenderedFeaturesInRect(
rect, layerIds, filter);
}

/// Query rendered features at a point in screen coordinates
/// Query features contained in the source with the specified [sourceId].
///
/// In contrast to [queryRenderedFeatures], this returns all features in the source,
/// regardless of whether they are currently rendered by the current style.
///
/// Note: On web, this will probably only work for GeoJson source, not for vector tiles
Future<List> querySourceFeatures(
String sourceId, String? sourceLayerId, List<Object>? filter) async {
Expand Down