Javascript Google Maps API 错误:DeletedApiProjectMapError

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38182710/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 21:10:30  来源:igfitidea点击:

Google Maps API error: DeletedApiProjectMapError

javascriptgoogle-mapsgoogle-maps-api-3jquery-gmap3

提问by Prakash Arul Mani

I have to use google map. I use below google API script

我必须使用谷歌地图。我使用下面的谷歌 API 脚本

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY"></script>

And i got below Error

我得到了低于错误

Google Maps API error: DeletedApiProjectMapError https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-error

Google Maps API 错误:DeletedApiProjectMapError https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-error

I created a New Project & New API key. But still this error came. Kindly help to solve this error.

我创建了一个新项目和新 API 密钥。但是这个错误还是来了。请帮助解决此错误。

回答by JFer

Yo should go to https://console.developers.google.comand after create your API KEY, go to "Google Maps JavaScript API" and just ENABLE (by default is DISABLE)

你应该去https://console.developers.google.com创建你的 API KEY 后,去“谷歌地图 JavaScript API”,然后启用(默认是禁用)

回答by Yang

You need to enable Maps JavaScript API for your website.

您需要为您的网站启用 Maps JavaScript API。

API link: https://console.developers.google.com/apis/library/maps-backend.googleapis.com?q=map

API 链接:https: //console.developers.google.com/apis/library/maps-backend.googleapis.com?q=map

enter image description here

在此处输入图片说明

回答by abielita

Based from this documentation, the DeletedApiProjectMapErrormeans that your API project may have been deleted from the Google API Console. Please check the project for which you generated the API key that's included in JavaScript API loader.

根据本文档DeletedApiProjectMapError意味着您的 API 项目可能已从 Google API 控制台中删除。请检查您生成了包含在 JavaScript API 加载器中的 API 密钥的项目。

Since you have already created a new API project and get a new key on the Google API Console, one workaround I found on this forumis to try deactivating all plugins to see if one of them is causing a conflict.

由于您已经创建了一个新的 API 项目并在 Google API 控制台上获得了一个新密钥,因此我在此论坛上找到的一种解决方法是尝试停用所有插件以查看其中一个是否会导致冲突。

Check this related link. It states that:

检查此相关链接。它指出:

I created new API keys in the first project for those maps again and deleted second project. The maps work partially now - without markers. It looks a little like manual blocking by someone on the Google maps side. Maybe someone is blocking access to Marker Manager .js file somewhere between my computer and a server where it is stored to ban my website.

我再次在第一个项目中为这些地图创建了新的 API 密钥并删除了第二个项目。地图现在部分工作 - 没有标记。看起来有点像谷歌地图方面有人手动屏蔽。也许有人阻止访问我的计算机和存储它的服务器之间某处的 Marker Manager .js 文件以禁止我的网站。

Hope this helps!

希望这可以帮助!

回答by Jesromled

I activate/enable more API Google Maps on https://console.developers.google.comand disappear this error.

我在https://console.developers.google.com上激活/启用更多 API Google Maps并消除此错误。

回答by Ocean

You have deleted the project in google cloud platform of which you created an API.Regenrate Api by creating a new Project in google cloud platform.

您已经在谷歌云平台中删除了您创建API的项目。通过在谷歌云平台中创建一个新项目来重新生成API。

回答by Lukas

There some answers saying the JavaScript API needs to be enabled as it is disabled by default. That seems to have changed. It was enabled by default in my account. It did not work anyway. I had to disable and reenable the API, then it worked.

有一些答案说需要启用 JavaScript API,因为默认情况下它是禁用的。那似乎已经改变了。它在我的帐户中默认启用。无论如何它都不起作用。我不得不禁用并重新启用 API,然后它就起作用了。

Also it is to be noted that Google says it may take a couple of minutes upon creation until the API key works, that may also have been the thing.

另外需要注意的是,谷歌表示在创建 API 密钥之前可能需要几分钟的时间,这也可能是这样。