如何在循环中进行地理编码而不超出查询限制
您好,我有一个程序,其中我需要执行无限数量的地理编码(通常在 20-200 之间)并将地址存储在数组中,但是当我在循环中进行地理编码时,我会出现“超出查询限制”错误。我该如何解决这个问题
Hi I have a program wherein I need to perform indefinite number of geocodings (usually between 20-200) and store the address in an array, however when I am doing geocoding in a loop I get Over query limit error. How do i get around this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这里没有人可能为您提供克服这一限制的策略。正确的答案是您需要在本地缓存这些内容。如果这意味着您有 200 个项目,那么您可能需要一两天的时间来生成缓存,但您需要重新实现您的程序,使其仅在尚未缓存的情况下向 Google 请求地理编码本地。
No one here is likely to give you a strategy to overcome this limitation. The correct answer is that you need to cache these locally. If that means you have 200 items then it may take you a day or two to generate the cache, but you need to re-implement your program in a way that it only requests a geocode from Google in the event that it is not already cached locally.
嗨,我尝试在我朋友的网站上执行此操作,它起作用了......我想谷歌每秒的限制足以处理循环......我想我已经超出了每天 2500 个查询的限制
HI I tried doing it on my friend's website and it worked .... I guess googles per second limit is good enough to handle loops ...... i think i was out of my 2500 queries per day limit