“您已超出此 API 的请求配额"在谷歌地图 [英] "You have exceeded your request quota for this API" in Google Map

查看:13
本文介绍了“您已超出此 API 的请求配额"在谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 react-google-map 让 Google Map 在我的 React 项目中运行,这是我的 Map 组件:

I am currently using react-google-map for getting Google Map to run in my React project, here is my Map component:

import React from 'react'
import { compose, withProps, lifecycle } from 'recompose'
import { withScriptjs, withGoogleMap, GoogleMap } from 'react-google-maps'

import MapStyle from  '../../../api/mapStyle'

const Map = ({ children }) => {

  return (

    <GoogleMap
      defaultZoom={15}
      defaultCenter={{ lat: 35.6840299, lng: 51.3861187 }}
    >
      {children}
    </GoogleMap>
  )
}

export default compose(
  withProps({
    googleMapURL: "https://maps.googleapis.com/maps/api/js?key=MY_KEY_HERE",
    loadingElement: <div style={{ height: `100%` }} />,
    containerElement: <div className='map' style={{ height: `100vh` }} />,
    mapElement: <div style={{ height: `100%` }} />
  }),
  withScriptjs,
  withGoogleMap,
)(Map)

正如你所看到的,正如 react-google-map DOC 所说,这里没有什么特别的!

As you can see this is as what react-google-map DOC says , nothing so fancy here!

昨天我刚刚开始构建地图,像往常一样,我去我的 Google 控制台并拿到了一个密钥,然后我把它放在了链接的 MY_KEY_HERE 部分,直到今天早上它都运行良好,今天我在挣扎:

Yesterday I just started to build map, and as normal I went to my Google console and got a key, then I put it on MY_KEY_HERE section of link , and it worked fine until this morning, today i am struggling with:

您已超出此 API 的请求配额

You have exceeded your request quota for this API

不是:

您已超出此 API 的每日请求配额

You have exceeded your daily request quota for this API

如下:

我搜索了谷歌,我找到了 thisthisthis 和许多其他人,但我找不到这个问题的任何正确答案.

I searched Google and I found this and this and this and many many others, but I could not find any proper answer to this problem.

  1. 我在控制台中创建了几个其他键来解决这个问题,但它没有解决,我得到了同样的 你已经超出了这个 API 的请求配额 错误
  2. 我在 Google 上使用了我的另一个帐户来解决此问题,我刚刚登录并转到控制台平台并再次生成了一个密钥,但我仍然收到该错误?
  3. 即使在 codeSandBox.io 中尝试,我仍然遇到相同的错误

我真的很困惑这个问题,我该怎么解决?

I'm really confused about this issue, how should I solve it?

推荐答案

检查您的项目是否有与之关联的计费帐户.您可以使用此 Google 工具:https://mapsplatformtransition.withgoogle.com/

Check if your project has a billing account associated to it. You can use this Google tool: https://mapsplatformtransition.withgoogle.com/

此项目没有结算帐号.您需要添加此项目的帐单信息以继续使用 Google 地图平台.每月使用的前 200 美元是免费的.您只需支付你用什么.您可以随时查看费率并访问您的支出在您的 Google Cloud Platform Console 中,您还可以每天设置配额以防止意外增加.你也可以设置账单提醒,在费用达到时接收电子邮件通知预设阈值由您决定."

"This project does not have a billing account. You will need to add billing information for this project to continue to use Google Maps Platform. The first $200 of monthly usage is free. You only pay for what you use. You can review rates and access your spending any time in your Google Cloud Platform Console, where you can also set daily quotas to protect against unexpected increases. You can also set billing alerts to receive email notifications when charges reach a preset threshold determined by you."

它会列出您使用 Google 地图的所有项目,如果项目状态不是良好",它会告诉您添加结算".

It will list all your projects using Google Maps and tell you to "Add Billing" if the project status is not "in good shape".

这篇关于“您已超出此 API 的请求配额"在谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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