google-maps - 关于 Google Maps API 配额限制的地方库

标签 google-maps google-maps-api-3 google-places-api

快速问题,只是为了澄清措辞和含义(因为它为 map 加载更改了几次......)

Places API 常见问题解答中有以下两个声明:

The Google Places API has the following query limits:

Users with an API key are allowed 1 000 requests per 24 hour period. Users who have verified their identity through the APIs console are allowed 100 000 requests per 24 hour period. A credit card is required for verification, by enabling billing in the console. We ask for your credit card purely to validate your identity. Your card will not be charged for use of the Places API. While the lower limit is sufficient for development and testing, we recommend enabling the higher limit before launching your application. It is possible to request an additional quota. If granted, the additional quota is free of charge. If, at some stage in the future, an option becomes available to pay for an additional quota, that quota will be over and above the existing free quota, and you will need to sign up for it explicitly.

Note that some services may have a multiplier:

The Text Search service is subject to a 10-times multiplier. That is, each Text Search request that you make will count as 10 requests against your quota. The Radar Search Service is subject to a 5-times multiplier. That is, each Radar Search request that you make will count as 5 requests against your quota. If you've purchased the Google Places API as part of your Maps API for Business contract, the multiplier may be different. Please refer to the Google Maps API for Business documentation for details.



这意味着 Google Places API 的使用限制为每天 100,000 次查询,如果您进行文本搜索,则限制为 10,000 次。

但是,在提升页面上,它显示以下内容:

If you are developing a web based application that only needs to search for places, and is not submitting new places or Place Bumps, you should use the Places library of the Maps API rather than using the Places API web service. The Places library assigns a quota to each end user rather than to each key. This means that your available quota increases with your user base rather than being capped at a fixed amount.



我正在通过以下方式使用 Places API:
https://maps.googleapis.com/maps/api/js?key=XXX&libraries=places
...
service = new google.maps.places.PlacesService(map);
service.textSearch(request, callback);

还有一些细节搜索和照片搜索。

因此我的问题是; 鉴于我对 Places API 的使用,我是否受到应用程序 100,000 次查询的限制,或者我在应用程序级别基本上不受限制,因为我的配额是针对每个最终用户的? (即每个唯一 IP?如果我有 10,000 个用户,我的整个用户群的有效配额为 100,000*10,000?)

编辑:

为清楚起见:如果我将 API key 放入 https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=XXXX ,它将增加我在 Google API 控制台上的 Places 配额计数,但是如果我通过我的 JS 应用程序运行查询,我看不到配额使用变化。我想确保我不会突然受到大量配额结果的影响。

最佳答案

使用 JavaScript API 服务(如 Places 库提供的服务)会为每个最终用户分配配额。它与 google.maps.Geocoder 等对象的设置非常相似。 ,在此 Geocoding Strategies 中对此进行了更详细的讨论。文章。

关于google-maps - 关于 Google Maps API 配额限制的地方库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20746264/

相关文章:

java - 我怎样才能改变我的安卓谷歌地图上集群的颜色?

java - 尝试使用谷歌地图 API v2 获取经度和纬度时显示错误

javascript - infoWindow.close 的 Mouseout 在 javascript 中的 Google Maps v3 上不起作用

iphone - 在通过 PhoneGap 创建的 iPhone 应用程序中使用 Google map

google-maps - 来自域名的 ZK 应用程序中用于 Google map 的 Google API key

javascript - 如何在谷歌地图 API 上按城市 + 邮政编码获取距离

google-maps - 将标记图像从 v2 转换为 API V3

安卓 Google Places API "PLACES_API_QUOTA_FAILED"

ios - 从 google places api ios 访问结果以自动完成

javascript - 按州过滤标记并结合地点自动完成功能 - Google Maps JavaScript API