TypeScript code snippet – How to find geopoints radius in mongoose?
Location.find({ loc: { $near: { $geometry: { type: "Point", coordinates: coords }, $maxDistance: maxDistance } } }).then((err, locations) => { // do what you want here })
Location.find({ loc: { $near: { $geometry: { type: "Point", coordinates: coords }, $maxDistance: maxDistance } } }).then((err, locations) => { // do what you want here })