Parse-SDK-Flutter icon indicating copy to clipboard operation
Parse-SDK-Flutter copied to clipboard

Additional query constraint: "wherePolygonContains"

Open Paul0Cesar opened this issue 3 years ago • 1 comments

New Feature / Enhancement Checklist

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
                    }
                }
            }'
        ));

Paul0Cesar avatar Jul 18 '22 17:07 Paul0Cesar

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!