Im developing an App using Node.js, MongoDB (Mongoose object schema model) I would like to know what is the way locate my geospatial coordinates using Node.js the code that I describe below retrieves the places near of 3000 meters of the coordinates [ 40.439731, -3.671092 ] and I would like to know what is the way to obtain my geospatial coordinates dynamically and retrieve the places near of 3000 meter of mine.
location: { $near: { $geometry: { type: "Point", coordinates: [ 40.439731, -3.671092 ] }, $maxDistance: 3000 } }
and I like
location: { $near: { $geometry: { type: "Point", coordinates: [ my coordinates ] }, $maxDistance: 3000 } }