Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #geopoints #radius #mongoose
ADD COMMENT
Topic
Name
7+5 =