如何修复错误"您已经超出了这个API&QUOT你每天的请求限额;在XML文件中谷歌地图?限额、您已经、错误、地图

2023-09-07 09:54:23 作者:╰~甜甜的爱

我在尝试使用此链接获取路线http://maps.googleapis.com/maps/api/directions/xml?origin=10.933952,106.863352&destination=10.9490721,106.8574901&sensor=false&units=metric&mode=wailing&metric=1\"但今天它不工作

请帮助我!

 < D​​irectionsResponse>  <状态>&OVER_QUERY_LIMIT LT; /状态><&ERROR_MESSAGE GT;  您已经超出了这个API你的日常请求限额。< / ERROR_MESSAGE>< / DirectionsResponse> 

解决方案 每天出现这3个错误怎么办

的https://developers.google.com/maps/documentation/business/articles/usage_limits#limitexceeded

  

您可以通过超过谷歌地图API的Web服务使用限制

 每天发送太多的要求。发送请求过快,每秒即太多的请求。发送请求过快过久或滥用Web服务。超过其他使用限制,例如每高程API请求中百分点。 

在接收到状态code OVER_QUERY_LIMIT的回应,您的应用程序应该确定哪些使用限制已经被超过。这可以通过暂停2秒和重新发送相同的请求来完成。如果状态code仍然是OVER_QUERY_LIMIT,您的应用程序每天发送太多的请求。否则,你的应用程序每秒发送过多的请求。

i was try use this link to get direction "http://maps.googleapis.com/maps/api/directions/xml?origin=10.933952,106.863352&destination=10.9490721,106.8574901&sensor=false&units=metric&mode=wailing&metric=1" but today it not working

please help me!!

<DirectionsResponse>
  <status>OVER_QUERY_LIMIT</status>
<error_message>
  You have exceeded your daily request quota for this API.
</error_message>
</DirectionsResponse>

解决方案

https://developers.google.com/maps/documentation/business/articles/usage_limits#limitexceeded

You can exceed the Google Maps API Web Services usage limits by:

Sending too many requests per day.
Sending requests too fast, i.e. too many requests per second.
Sending requests too fast for too long or otherwise abusing the web service.
Exceeding other usage limits, e.g. points per request in the Elevation API.

Upon receiving a response with status code OVER_QUERY_LIMIT, your application should determine which usage limit has been exceeded. This can be done by pausing for 2 seconds and resending the same request. If status code is still OVER_QUERY_LIMIT, your application is sending too many requests per day. Otherwise, your application is sending too many requests per second.