gpt4 book ai didi

javascript - 配额及其消耗如何运作?

转载 作者:行者123 更新时间:2023-12-03 08:35:18 26 4
gpt4 key购买 nike

我对 Google Maps JS API 的配额分配配额消耗有点迷失。

  1. Places WebService API, per user quota hint @ JS API :

    If you are developing a web based application that only needs to search for places, and does not submit new places, you should use the Places Library of the Google Maps Javascript API rather than the Google 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.

    不错!但它究竟是如何运作的呢?什么被视为最终用户?他能获得多少配额?

  2. JavaScript API, maploads :

    它会消耗每个用户每个 key 的配额吗?

  3. JavaScript API, Places Library, Searching :

    Note that each search counts as a single request against your usage limits.

    好的,但这在有关搜索响应(附近搜索、文本搜索、雷达搜索)的部分中提到 - 地点详细信息请求是否相同?

  4. 其他库/功能:

    JS API 提供了很多子库,Places 库也提供了很多子库 - 这些也没有文档记录,它们是基于每个用户还是基于每个键使用的?

我是否错过了详细的使用消耗规则表?

当然,我假设每个请求都会占用配额中的一个请求,这听起来不错,但是每用户配额何时以及如何启动?

最佳答案

最终用户是访问您网页的用户。

当您使用maps-javascript-API(包括任何服务/库)时,只有 1 个与您相关的配额,即 mapLoads 配额(每天 25k)。

What constitutes a 'map load' in the context of the usage limits that apply to the Google Maps Web APIs?

A single map load occurs when:

  • a map is displayed using the Google Maps JavaScript API when loaded by a web page or application;

  • a Street View panorama is displayed using the Google Maps JavaScript API by a web page or application that has not alsodisplayed a map;

  • a single request is made for a map image from the Google Static Maps API; or

  • a single request is made for a panorama image from the Google Street View Image API.

此配额与网页的域名有关(或使用 key 时与项目相关)

<小时/>

通过 Javascript-API 对服务/图书馆的任何后续请求(例如地点、地理编码、方向等)都将影响最终用户(访问者)的配额。通常,唯一相关的最终用户配额是每秒请求数(每秒大约 10 个请求),因此您必须注意您的网页不会过快发送太多请求。

关于javascript - 配额及其消耗如何运作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33232105/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com