从https://developers.google.com/maps/documentation/staticmaps/#Limits我读到:
Google 静态地图 API 具有以下使用限制:
每个应用程序每天 25 000 个免费静态地图请求。
如果我没有在 URL 中提供 API 密钥,它如何确定限制?引用页面的IP?引用 URL 的域?客户端IP?
从https://developers.google.com/maps/documentation/staticmaps/#Limits我读到:
Google 静态地图 API 具有以下使用限制:
每个应用程序每天 25 000 个免费静态地图请求。
如果我没有在 URL 中提供 API 密钥,它如何确定限制?引用页面的IP?引用 URL 的域?客户端IP?
我们在我们的网站上使用了静态地图,我们发现它使用了客户端的 IP 地址。因此,经常查看我们网站的人会发现您的配额已超出的大图片会显示给他们,但不会显示给我。
I start by declaring that I do not know this, but the logical choice is the domain.
With ip restriction multiple clients on the same web server would consume each others quotas which they should have thought of.
*Client ip would be useless in every metric. *Server ip would mean multiple clients on one host would consume each others quota.
Whats left is the domain. However with that said, Google is know to use their brains and I would not be surprised if they have a combination running to find abuse. Like so.
If domainA.com uses up 25 000 in one day and them immediately domainB.com comes online and starts asking for images from the same ip that might ring some bells.
Of course the same would be true even for different ip if they all request the same location.
So in summary, I think if you randomize which domain asks for the map at any given cient request and only locally mark a domain as spent (for the day) when you get error back I think you can request infinite amount (if you have infinite domains). With the possible caveat of detection if all request the same location.
Of course spreading the different domains over different servers/ip would make it impossible to detect, however unlikely it's needed.
定价模型和谷歌为其网络服务 API 发布的使用限制尚不明确,但我想接受的答案是错误的且具有误导性 - 请参阅谷歌静态地图使用的两个冲突声明
25k 使用限制将适用于应用程序,而不适用于其客户端。