geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

Reverse Geocode example is not working #50

Open tacticiankerala opened 10 years ago

tacticiankerala commented 10 years ago

I have tried the following example given in reverse geocode section,

res=Geokit::Geocoders::GoogleGeocoder.reverse_geocode "37.791821,-122.394679"
=> #<Geokit::GeoLoc:0x558ed0 ...
res.full_address
"101-115 Main St, San Francisco, CA 94105, USA"

But I am getting the following result,

Provider: 
Street: 
City: 
State: 
Zip: 
Latitude: 
Longitude: 
Country: 
Success: false

What could be wrong?

tacticiankerala commented 10 years ago

Found out the solution, instead of Geokit::Geocoders::GoogleGeocoder.reverse_geocode use the following

res=Geokit::Geocoders::GoogleGeocoder3.reverse_geocode "37.791821,-122.394679"
res.full_address