node.js - Mongo geojson error $near requires geojson point -
node.js - Mongo geojson error $near requires geojson point -
i have meteor app throwing error in method querying mongo db locations nea
mongoerror: $near requires geojson point, given { type: "point", coordinates: [ 40.23511038435587, -87.76385225707914 ]
below query statement if makes difference
var thangs = thangs.find ( { 'coordinates2d': { $near: { $geometry: { type: "point", "coordinates": [ parsefloat (latitude) , parsefloat (longitude) ] }, $maxdistance: radiusmeters } } } ).fetch ();
i can phone call method locally coordinates , seems fine, find above error in server logs.
any advice appreciated. please allow me know if there more info can provide.
node.js mongodb meteor geojson
Comments
Post a Comment