node.js - geoNear not found on Mongoose model? -
i'm confused why geonear not found on mongoose model:
var location = { type : 'point', coordinates : coordinates }; shift.geonear(location, { maxdistance : 5, spherical : true }, function(err, results, stats) { response.json(results); console.log(stats); }); typeerror: object function model(doc, fields, skipid) { if (!(this instanceof model)) return new model(doc, fields, skipid); model.call(this, doc, fields, skipid); } has no method 'geonear'
Comments
Post a Comment