为什么我在使用Google的Geocoder API时遇到OVER_QUERY_LIMIT? [英] Why am I OVER_QUERY_LIMIT when using Google's Geocoder API?

查看:1697
本文介绍了为什么我在使用Google的Geocoder API时遇到OVER_QUERY_LIMIT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个应用程序,可以让我输入地址并通过Google的Geocoding API获取纬度/经度。我使用AJAX调用创建Google Geocoder API调用的PHP脚本,它看起来像这样:

  $ base_url =http ?://maps.googleapis.com/maps/api/geocode/xml传感器=假安培;地址=; 
$ address = urlencode($ addy1。'。。$ addy2);
$ url = $ base_url。$ address;

其中$ addy1是街道地址,$ addy2是适当格式的City / State / Zip用于地理编码。



当我在那个$ url上执行一个file_get_contents时,我总是得到'status'=> OVER_QUERY_LIMIT。



我甚至不会接近每天达到2500个查询限制。我今天到目前为止尝试了大概15个不同的地址,而我昨天根本没有工作。

顺便说一句,自从星期一上午以来,我们一直有这个问题。我们最近确实将应用程序移至云解决方案。由于共享IP在云上的特性,我们是否有可能收到OVER_QUERY_LIMIT?



我没有其他解决方案。使用API​​密钥以REQUEST_DENIED响应结束,因为Geocoding API不使用API​​密钥

解决方案

我们一直在这个问题自星期一早上起。我们最近确实将应用程序移至云解决方案。由于共享IP在云上的特性,我们是否有可能收到OVER_QUERY_LIMIT?



这是最可能的答案。您可以将地理编码移动到客户端吗?



编辑:另一种选择是查看是否可以为您的服务器获取地理编码的专用IP地址。 / p>

2011年的类似查询


I have this application that lets me put in an address and get the lat/lng via Google's Geocoding API. I use AJAX to call a PHP script which creates the Google Geocoder API call, it looks like this:

    $base_url = "http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=";
    $address = urlencode($addy1 . ' ' . $addy2);
    $url = $base_url.$address;

where $addy1 is the street address and $addy2 is the City/State/Zip in the proper format for geocoding.

When I perform a file_get_contents on that $url, I consistently get a 'status'=>OVER_QUERY_LIMIT.

I do not come even close to reaching the 2500 query limit per day. I have tried maybe 15 different addresses so far today, and I didn't work at all yesterday.

As an aside, we have been having this issue since Monday morning. We did recently move the application to a cloud solution. Is it possible that we are receiving an OVER_QUERY_LIMIT due to the nature of shared IP's on the cloud?

I don't have any other solutions for this. Using an API Key ends with a REQUEST_DENIED response, since the Geocoding API doesn't use an API Key

解决方案

We have been having this issue since Monday morning. We did recently move the application to a cloud solution. Is it possible that we are receiving an OVER_QUERY_LIMIT due to the nature of shared IP's on the cloud?

This is the most likely answer. Can you move the geocoding to the client side?

EDIT: another option would be to see if you can get a dedicated IP address for your server that does the geocoding.

Similar query from 2011

这篇关于为什么我在使用Google的Geocoder API时遇到OVER_QUERY_LIMIT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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