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

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

c# - Populating Gridview inside Listview ItemTemplate On Web User Control from Code Behind -