0

I want to show nearby places on the map for a given user. I can do so either by query MongoDB like this:

db.places.find( {
  loc: { $geoWithin: { $centerSphere: [ [ -88, 30 ], 10/3963.2 ] } }
} )

and either by query a Reids geospatial set like this:

georadius key longitude latitude 100 m 

Any pros and cons?

Raz Buchnik
  • 7,753
  • 14
  • 53
  • 96
  • It really depends of which stack you are already using in your application, do you use any of them? – Tug Grall Oct 05 '20 at 08:46
  • Yes I am using MongoDB and I can achieve this using the $geoWithin, but I wonder if it will be wise to implement this over Redis.. But I think you are right and its better going on with mongo as it now. – Raz Buchnik Oct 05 '20 at 09:26

0 Answers0