google-maps - 已超出地图服务的每日配额限制,但未显示已使用配额
问题描述
我有一个包含地点列表的 Google 表格。对于每个地方,我的目标是一次计算它与所有其他地方的距离,目的是找到彼此附近的地方。
我getDistance()
下面的函数返回一个浮点数,对应于两个地址之间的英里距离:
(我已经修改了我的 API 密钥和客户端 ID)
function getDistance(from, to) {
var key = '{my-API-key}';
var clientID = '{my-client-id}';
Maps.setAuthentication(clientID, key);
var directions = Maps.newDirectionFinder()
.setOrigin(from)
.setDestination(to)
.setMode(Maps.DirectionFinder.Mode.DRIVING)
.getDirections();
return parseFloat(directions.routes[0].legs[0].distance.text);
};
我尝试过的事情:
- 启用了距离矩阵 API 和方向 API。
- 在 Google Cloud Console 中注册并启用结算(按照 Google 支持代表的指示,但无济于事)
这些启用的 API 在 API 控制台中均未显示任何用法,但我的脚本仍然存在以下错误:
一天服务调用次数过多:路由
我没有看到为此设置的任何相关配额,所以我不明白什么?
解决方案
推荐阅读
- ansible - 如何使用 ansible 在 vCenter 上安装操作系统?
- spring-boot - 有没有办法找到 RabbitMq 消费者/听众的状态
- terraform - Terraform - AWS 多个子网问题
- android - 自定义构建类型不适用于 androidTest 构建
- javascript - 如何使用 Angular 7 从表单提交操作链接?
- php - 根据 2 列中的数据插入或更新行 - 1 个主列和 1 个唯一列
- android - 错误:程序类型已存在:androidx.asynclayoutinflater.R
- python - 如何在 python 上读取具有相似名称的文件,重命名它们然后使用它们?
- swift - 如何混淆可可豆荚的快速代码
- xml - 对一个文档使用不同的页序母版