问题
Rails Geocoder says not to use Key for Free version, to instead only use the key for Premier. The site i'm maintaining seems to be going over the limit not, so I set up a new api key and enabled billing.
I setup my initilizer like so
Geocoder.configure(
:timeout => 5,
:lookup => :google,
:api_key => "ENTERED MY KEY HERE",
:units => :mi
)
I Get a REQUEST DENIED in my logs. When I delete the file it uses geocoders default config and works. But my the morning it will stop working, assuming I'm going over the limit. Rather than setting up a Premier account, I enabled billing assuming we would just be charged the difference. I think I read $.50 per 1000 requests. Any Ideas?
回答1:
Cache your geocoding requests, it will save you some bucks (hopefully) and speed up your app (for sure).
Geocoder.configure(
# ...
:cache => Redis.current
)
回答2:
I sadly went with Microsoft's Bing service.
来源:https://stackoverflow.com/questions/18524165/setting-up-rails-geocoder-with-personal-api-key