node.js - Loopback near filter returns all objects -


near filter of loopback returns me objects or nothing. tried different option no correct result. maybe i've skipped step. here code:

status.getmeasurementposition = function(userlocation, cb) {   const measurement = status.app.models.measurement;   measurement     .find(       {         where: {               location: { near: userlocation}         },         limit: 3},         function(err,measurements){           cb(null,measurements);         }); } 

userlocation here geopoint object.

here code measurement model

"location":{   "type":"geopoint"       } 

hopefully can me this.


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -