Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$c = (new MongoClient())->demo->points;
$c->find( [
'loc' => [
'$geoWithin' => [
'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