且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

商业API密钥无效:此页面无法正确加载google地图

更新时间:2021-11-08 00:13:24

对于遇到此"此页面无法正确加载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.

希望这会有所帮助.