1

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 } }
Edu
  • 460
  • 12
  • 34
  • 1
    This is a question on how to retrieve current location via node.js API right? MongoDB won't have any awareness of your location. You should retitle this to target node.js and provide more background on the environment you are working in. – James Wahlin Apr 07 '14 at 21:18
  • This post may provide what you are looking for: http://stackoverflow.com/questions/16664623/best-node-js-module-for-finding-location – James Wahlin Apr 08 '14 at 13:05

0 Answers0