Parse-SDK-Flutter
Parse-SDK-Flutter copied to clipboard
Additional query constraint: "wherePolygonContains"
New Feature / Enhancement Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
Current Limitation
Not have a method for adding Polygon constraint, to check if one geoPoint exist in Polygon.
Similar exist in Android - wherePolygonContains
Feature / Enhancement Description
Create a new constraint to check if Polygon contains the geopoint
Example Use Case
1- Get a real location of customer
2 - You need to check which city the customer is in
3 - In you database have Cities Polygons , and you can check what is the city of customer with this constraint
Alternatives / Workarounds
- We can use in QueryBuilder the field : queries for add Polygon constraint
QueryBuilder query = QueryBuilder<ParseObject>(ParseObject('SCHEMA'));
query.queries.add(MapEntry<String, dynamic>('SINGLE_QUERY',
'"ColumnName":{
"$geoIntersects":{
"$point":{
"__type":"GeoPoint",
"latitude":$lat,
"longitude":$lng
}
}
}'
));
Thanks for opening this issue!
- 🎉 We are excited about your ideas for improvement!