Mongoose calls to geoNear with GeoJSON points as query parameters not working
Given a schema defined for documents containing a GeoJSON location; var BranchSchema = new Schema({ location: { 'type': { type: String, required: true, enum: ['Point', 'LineString', 'Polygon'], default: 'Point' }, coordinates: [Number] }, name: String }); BranchSchema.index({location: '2dsphere'}); And some sample data: [ { "name": "A", "location": { "type": "Point", "coordinates": [153.027117, -27.468515 ] //Brisbane, Australia } }, { "name": "B", "location": { "type": "Point", "coordinates": [153.029884, -27.45643] //Also Brisbane, Australia } } ] The following geoNear query is not behaving