Has anyone that works with the Rails Geokit::Geocoder been able to geocode with it over the last few weeks?
I can no longer get an address to geocode regardless of its format or if the string itself can be entered directly into google maps and returns a single result.
Neither
Address1, address2, city, postcode
nor
London, UK
formats will return anything other than "Google was unable to geocode address:...".
has the service been stopped or perhaps other users are consuming the daily geocoding limit as soon as it reset?
Ruby 1.8.7
Rails 2.3.15
Geokit 1.6.5
Edit:
After further investigation I've determined that the comment on geocoding limits is not the case, my api key didn't resolve the issue.
--- Used solution ---
This is the alternative I used (before an answer was posted).
def self.geocodeAddress address
address.gsub!(/,/, ",+").gsub!(/\s/, "")
res = MultiJson.load open("http://maps.googleapis.com/maps/api/geocode/json?address=#{address}&sensor=false").read()
res["results"].first["geometry"]["location"] if res["status"] == "OK"
end
Can't remember why the /\s/ replacement was made, I've left it in for transparency..