Google Maps API error: DeletedApiProjectMapError

2019-02-16 05:10发布

问题:

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

<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

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

回答1:

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



回答2:

Based from this documentation, the DeletedApiProjectMapError means 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.

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 forum is to try deactivating all plugins to see if one of them is causing a conflict.

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.

Hope this helps!



回答3:

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



回答4:

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.

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.



回答5:

You need to enable Maps JavaScript API for your website.

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