user2184718 user2184718 - 7 months ago 21
Ruby Question

Get address from Geocode latitude and longitude

For the bulk of my application, I am getting the latitude, longitude, postal code, etc of a town/city from Geocoder. I am just putting in the city and state and in return I am getting

I am in a scenario where I have a venue. That venue needs an address and I am getting that venues latitude and longitude from another source. Using the Geocoder gem, am I able to get an address by giving it a latitude and longitude?

Answer

Use reverse_geocode_by. It's all in here: https://github.com/alexreisner/geocoder