Forked from meghangill/gist:6a0f5511b2b362556bf0
Last active
September 23, 2015 10:29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$c = (new MongoClient())->demo->points; | |
$c->find( [ | |
'loc' => [ | |
'$geoWithin' => [ | |
'$geometry' => [ | |
'type' => 'Polygon', | |
'coordinates' => [ [ | |
[ -0.91, 51.74 ], | |
[ -0.91, 51.27 ], | |
[ 0.67, 51.27 ], | |
[ 0.67, 51.74 ], | |
[ -0.91, 51.74 ] | |
] ] | |
] | |
] | |
] | |
] ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment