Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
http://docs.mongodb.org/manual/reference/operator/query-geospatial/#geospatial-query-compatibility
This page says to use:
{ $geoWithin : {
|
$center : [x1, y1],
|
$maxDistance : d
|
} }
|
But this is invalid syntax:
> db.generated.find({ "location.coordinates": { $geoWithin: {$center: [40, 7.25], $maxDistance: .01}}})
|
error: {
|
"$err" : "the first field of $center object must be a location object",
|
"code" : 13656
|
}
|
This does work:
> db.generated.find({ "location.coordinates": { $geoWithin: {$center: [[40, 7.25], .01]}}})
|