原因是什么“Google Maps API服务器拒绝了您的请求。此API项目发现内部错误。“? [英] What causes "The Google Maps API server rejected your request. An internal error was found for this API project."?

查看:1239
本文介绍了原因是什么“Google Maps API服务器拒绝了您的请求。此API项目发现内部错误。“?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个带有3个img标签的网页,每个标签都是对静态 maps API ,真正的api键)。



3个标签是相同的,除了缩放,这三个图像分别为10,13和16。 b

API密钥来自启用了静态地图API的项目,并已配置并启用了帐单。



我发送了大约60个请求总计(这是一个全新的开发项目,所以我刚刚开始)。



我所看到的是,有时会显示所有三张地图。在其他时间,从三个地图中的一个(随机从三个)地图失败,并且


403Google Maps API服务器拒绝了您的请求。


因此,如果我刷新页面5次,即15个请求,我收到大约4次失败和11次成功。

那么为什么Google Maps会随机拒绝这个403请求?

解决方案

您确定您的API密钥是正确的吗?

https://developers.google.com/maps/documentation/staticmaps/#Limits


Google静态地图API具有以下使用限制:


  • 没有API密钥:



    每个IP地址每24小时有1,000个静态地图请求。
    每分钟IP地址50个静态地图请求。这意味着如果您的单个页面包含超过50张地图,该页面将超出此限制。

    其他图片请求可以按照常见问题中列出的费率按每个应用程序购买。额外的配额通过API控制台购买,并需要使用API​​密钥。



    如果用户超过这些限制,服务器将返回HTTP 403状态并显示以下图片显示配额已被超出:


似乎每分钟50张地图可以解释您的随机403错误。 >

如果这不是问题,我会提交支持Google地球支持凭单,因为它被标记为内部错误。


This is using the Static Maps API.

I have a web page with 3 img tags, each of which is a call to the static maps API, (NB of course this is not the real api key).

The 3 tags are identical, except the zoom, which is 10, 13 and 16 for the three images.

The API Key is from a project with the Static maps API enabled, and billing configured and enabled.

I have sent perhaps 60 requests in total (this is a brand new development project, so I'm just getting started).

What I'm seeing is that sometimes, all three maps are displayed. At other times one (random from the three) map fails with

403 "The Google Maps API server rejected your request. An internal error was found for this API project."

So if I refresh the page 5 times, ie 15 requests, I get approx 4 failures and 11 successes.

So why is Google Maps randomly rejecting some of the requests with this 403?

解决方案

Are you sure your API key is correct?

From https://developers.google.com/maps/documentation/staticmaps/#Limits :

The Google Static Maps API has the following usage limits:

  • Without an API key:

    1,000 Static Maps requests per IP address per 24 hour period. 50 Static Maps requests per IP address per minute. This means that if you have a single page containing more than 50 maps, the page will exceed this limit.

Additional image requests can be purchased on a per application basis at the rate currently listed in the FAQ. Additional quota is purchased through the API Console and requires the use of an API key.

If a user exceeds these limits, the server will return an HTTP 403 status and display the below image to indicate that the quota has been exceeded:

Seems like the 50 maps per minute could explain your random 403 errors.

If this isn't the problem, I would file a support ticket with Google Geo support since it's labelled as "an internal error".

这篇关于原因是什么“Google Maps API服务器拒绝了您的请求。此API项目发现内部错误。“?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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