如何在不收到 OVER_QUERY_LIMIT 响应的情况下对 20 个地址进行地理编码? [英] How do I Geocode 20 addresses without receiving an OVER_QUERY_LIMIT response?

查看:28
本文介绍了如何在不收到 OVER_QUERY_LIMIT 响应的情况下对 20 个地址进行地理编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Google Geocoder v3,如果我尝试对 20 个地址进行地理编码,我会得到一个 OVER_QUERY_LIMIT,除非我将它们间隔约 1 秒,但在我的标记全部放置之前需要 20 秒.

Using the Google Geocoder v3, if I try to geocode 20 addresses, I get an OVER_QUERY_LIMIT unless I time them to be ~1 second apart, but then it takes 20 seconds before my markers are all placed.

除了提前存储坐标还有其他方法吗?

Is there any other way to do it, other than storing the coordinates in advance?

推荐答案

不,真的没有其他方法:如果您有很多位置并想在地图上显示它们,最好的解决方案是:

No, there is not really any other way : if you have many locations and want to display them on a map, the best solution is to :

  • 在创建位置时使用地理编码器获取纬度+经度
  • 将它们与地址一起存储在您的数据库中
  • 并在您想要显示地图时使用这些存储的纬度+经度.

这当然是考虑到您创建/修改位置的次数比咨询位置要少得多.

This is, of course, considering that you have a lot less creation/modification of locations than you have consultations of locations.


是的,这意味着您在保存位置时需要做更多的工作——但这​​也意味着:


Yes, it means you'll have to do a bit more work when saving the locations -- but it also means :

  • 您将能够按地理坐标进行搜索
    • 我想要一个靠近我现在位置的点的列表"
    • 即使上面有 20 多个位置
    • 您不太可能在 N 秒内达到 X 个地理编码器调用的限制.
    • 而且您不太可能达到每天 Y 次地理编码器调用的限制.

    这篇关于如何在不收到 OVER_QUERY_LIMIT 响应的情况下对 20 个地址进行地理编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆