gpt4 book ai didi

ruby-on-rails - 在生产服务器上使用地理编码器

转载 作者:行者123 更新时间:2023-12-04 06:22:54 25 4
gpt4 key购买 nike

我正在开发一个基于位置的应用程序。我需要一个可靠的来源来获取地理定位。
现在我正在使用这个 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 theGeocoding Web Service has a quota of2,500 requests per IP per day, so allrequests in one day count against thequota. In addition, the Web Service israte-limited, so that requests thatcome in too quickly result inblocking. Client-side geocodingthrough the browser is rate limitedper map session, so the geocoding isdistributed across all your users andscales with your userbase. Geocodingquotas and rate limits drive thestrategies outlined in this article.

When to Use Client-Side Geocoding

The basic answer is "almost always". Asgeocoding limits are per IP address,that limit counts against the consumerof your application. It's going to bevery rare that someone is going toenter more than 2,500 addresses a daysitting at their computer. Therefore,running client-side geocoding, yougenerally don't have to worry aboutyour quota.


http://code.google.com/apis/maps/articles/geocodestrat.html

关于ruby-on-rails - 在生产服务器上使用地理编码器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6451099/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com