Reputation: 373
I have a RoR app which has a feature allowing users to add markers in a google maps. This markers are saved in a model that have latitude and longitude attributes.
Supposing that an user placed and saved a marker in a specific location, Stonehenge for example, how can I verify if have any other markers in 250 meters radius of Stonehenge?
Any help will be really appreciated! Thanks everyone!
Upvotes: 1
Views: 1543
Reputation: 19879
Look into the geocoder gem. It can convert addresses to lat/lon and ties into active record to do "find me things near this thing" queries.
https://github.com/alexreisner/geocoder/
Upvotes: 3