商业API密钥无效:此页面无法正确加载google地图 [英] a commercial API key did not work: This page can't load google maps correctly

查看:73
本文介绍了商业API密钥无效:此页面无法正确加载google地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用了一个新钥匙,并得到了:

I used a new key and got:

此页面无法正确加载Google地图"

"This page can't load google maps correctly"

这到底是什么意思?

<script src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY&libraries=places" async defer"></script>

这是来自商业帐户的密钥.

This is a key from a commercial account.

推荐答案

对于遇到此"此页面无法正确加载google地图"错误的任何人,并添加了地方信息库,即:

For anyone who runs into this "This page can't load google maps correctly" error and has added the Places library in the JavaScript API script, i.e.:

<script src="https://maps.googleapis.com/maps/api/js?key=KEY&libraries=places"></script>

您必须启用Places API .仅启用JavaScript API是不够的.请参阅 Google的文档:

You must enable the Places API. It's not enough to enable the JavaScript API only. Refer to Google's documentation:

在使用Maps JavaScript API中的Places库之前,请先确保已在Google Cloud Platform中启用Places API控制台,在您为Maps JavaScript API设置的同一项目中.

Before using the Places library in the Maps JavaScript API, first ensure that the Places API is enabled in the Google Cloud Platform Console, in the same project you set up for the Maps JavaScript API.

希望这会有所帮助.

这篇关于商业API密钥无效:此页面无法正确加载google地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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