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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -