I'm trying to find locations in the DB within the contiguous United States. To do this, I'm using the query "withinPolygon" and a square around the US. Not exact, but should work :) The response I'm getting is 'bad constraint: $geoWithin'
Curious if anyone else has used the "withinPolygon" query and if there's something I'm doing wrong?
Here's the basic code:
$query = new Parse\ParseQuery( "Church" );$nwCornerContiguous = new Parse\ParseGeoPoint( $top, $left );$neCornerContiguous = new Parse\ParseGeoPoint( $top, $right );$swCornerContiguous = new Parse\ParseGeoPoint( $bottom, $left );$seCornerContiguous = new Parse\ParseGeoPoint( $bottom, $right );$query->withinPolygon( "locationGeopoint",array( $nwCornerContiguous, $neCornerContiguous, $swCornerContiguous, $seCornerContiguous ) );$results = $query->find();
I'm trying to find locations in the DB within the contiguous United States. To do this, I'm using the query "withinPolygon" and a square around the US. Not exact, but should work :) The response I'm getting is 'bad constraint: $geoWithin'
Curious if anyone else has used the "withinPolygon" query and if there's something I'm doing wrong?
Here's the basic code:
$query = new Parse\ParseQuery( "Church" );
$nwCornerContiguous = new Parse\ParseGeoPoint( $top, $left );
$neCornerContiguous = new Parse\ParseGeoPoint( $top, $right );
$swCornerContiguous = new Parse\ParseGeoPoint( $bottom, $left );
$seCornerContiguous = new Parse\ParseGeoPoint( $bottom, $right );
$query->withinPolygon( "locationGeopoint",
array( $nwCornerContiguous, $neCornerContiguous, $swCornerContiguous, $seCornerContiguous ) );
$results = $query->find();