I have stored latitude and longitude for different interesting places in my database. Whenever a user clicks into any of the interesting places, the show page displays details of the location, along with a google map with a marker pointing at it.
Now I have been trying to implement a button to "Show nearby places", along with a drop-down for ranges (eg. 50km, 100km, 150km), but could not figure out how to do it.
I was wondering how to find the neighboring places within a given range from a selected location, using the latitudes and longitudes I have in my database.