我正在开发一个基于位置的应用程序。我需要一个可靠的来源来获取地理定位。
现在我正在使用这个 geocoder 插件。
我收到此错误:-
Geocoding API not responding fast enough (see Geocoder::Configuration.timeout to set limit).
当我们的 5 人团队在临时服务器上进行测试时出现错误我需要一个足够快的解决方案,每天有大约 1 万个请求,没有每秒限制
PS:我愿意使用一些付费服务。
编辑
想一想您想在纽约搜索某些内容的案例。在文本框中,您将输入 newyork 并按 Enter。现在在服务器端,我需要为 newyork 获取地理编码,然后根据它在 db 中搜索。
最佳答案
您应该对客户端(在 javascript 中)进行地理编码,您不会受到限制:
Server-side geocoding, through the Geocoding Web Service has a quota of 2,500 requests per IP per day, so all requests in one day count against the quota. In addition, the Web Service is rate-limited, so that requests that come in too quickly result in blocking. Client-side geocoding through the browser is rate limited per map session, so the geocoding is distributed across all your users and scales with your userbase. Geocoding quotas and rate limits drive the strategies outlined in this article.
When to Use Client-Side Geocoding
The basic answer is "almost always". As geocoding limits are per IP address, that limit counts against the consumer of your application. It's going to be very rare that someone is going to enter more than 2,500 addresses a day sitting at their computer. Therefore, running client-side geocoding, you generally don't have to worry about your quota.
http://code.google.com/apis/maps/articles/geocodestrat.html
关于ruby-on-rails - 在生产服务器上使用地理编码器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6451099/