Google Maps JavaScript API error: ExpiredKeyMapError did not fixed - javascript

I am using a plugin on my WordPress website and getting the following error.
I just want to mention that I created a new API and added the payment option to it. Enabled all the needed SDK. I followed all the steps on how to create an API and finally implemented the API but I am still getting this error.
Google Maps JavaScript API error: ExpiredKeyMapError
https://developers.google.com/maps/documentation/javascript/error-messages#expired-key-map-error
https://prnt.sc/yIJ-Tdbnku_Q

Related

Need to add the new Google Maps API KEY to my existing Drupal7 site

In my drupal site i am getting the error alert like "This page can't load Google Maps correctly.". My website is built on drupal7. Where to add the script tag with that new API key generated through admin login UI. I mean in which module of UI i has to change. Please find the attached screenshot for reference.
Any quick help more helpful.
You need to get a license for google maps api as , Google has implemented a new Pricing module in july for google maps.
Google's new billing and pricing model requires you to add a credit card to use even the free API's. If you are using the Javascript API for Static Maps, it is no longer free. The documentation/tutorial page which shows code examples, will provide a key, however it will not work until you add your billing info.
https://cloud.google.com/maps-platform/pricing/sheet/
https://developers.google.com/maps/documentation/javascript/tutorial

how to include googe maps api key in rd google map plugin

i am using RD Google Map plugin but i can't find the google api script
the page do not display the map and display this error and a gray area instead of map
js?sensor=false&libraries=geometry,places&v=3.7&_=1525804623037:40 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
then i tried to add this script line to initialize the google maps
<script src="https://maps.googleapis.com/maps/api/js?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" type="text/javascript"></script>
but this time the map did not display at all
with this error
js?sensor=false&libr…&_=1525804236821:96 You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
if i include the script it says it is included multiple times and if i exclude it it says no key
please advice
thanks in advance
After more searching and digging i found the answer here
MissingKeyMapError when configuring Google Maps API
i tried the solution and find it helpful and the issue is solved

angular google maps api key not getting passed

I am trying to use Angular google maps and I went through the quick setup supplied by angular google maps
.config(['$routeProvider','$locationProvider','uiGmapGoogleMapApiProvider,
function($routeProvider,$locationProvider,uiGmapGoogleMapApiProvider) {
// Other configurations
uiGmapGoogleMapApiProvider.configure({
key: ‘MY_GOOGLE_API_KEY’,
v: ‘3.17’,
libraries: 'weather,geometry,visualization'
});
}
]);
I setup an API key in Google API Console, but when I load the page i get an MissingKeyMapError.
Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
I have the Google Javascript API enabled in the API console. I am at a loss as to what I am doing wrong. Any help would be greatly appreciated.
I solved the issue. Turns out I was loading the Google Maps API v3 twice. I was loading it in the provider
uiGmapGoogleMapApi.then(function(maps) {});
and loading the script tag
<script src="https://maps.googleapis.com/maps/api/js"></script>
Once I removed the script tag, It worked!
Thanks for everyones help.
Make sure that you used a key parameter with a valid API key. Follow this link for the steps on how to get the proper API Key for your project.
Go to the Google API Console.
Create or select a project.
Click Continue to enable the API and any related services.
On the Credentials page, get a Browser key (and set the API Credentials). Note: If you have an existing Browser key, you may
use that key.
To prevent quota theft, secure your API key following these best practices.
(Optional) Enable billing. See Usage Limits
for more information.
But based from this thread, the problem was because of a stray script tag which was including the google maps api before using this library. You can also check this related SO question.
Hope this helps!

Google Maps API error: DeletedApiProjectMapError

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.
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)
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
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!
I activate/enable more API Google Maps on https://console.developers.google.com and disappear this error.
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.
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.

Google API key not valid for Maps

This question has been asked before and I read the solutions and none of them seem to work. I always get an error message that states -
"Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site"
I'm sticking to the code provided on the "Getting Started" tutorial, word for word. I've obtained the API key as they suggested and have even activated the Google Maps API V3 service. I still seem to be getting that error.
I doubt it's my code because I have literally copied and pasted the code they have provided (except have added my own API key in place), like so.
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key={My_Key_Instead}">
</script>
The link to the tutorial and the code I'm using is provided below.
https://developers.google.com/maps/documentation/javascript/tutorial
Edit - I would like to mention that I've allowed any referer.
The solutions I have tried mentioned in other posts are:
1 - Getting a new API key
2 - Allowing any referer - (Part of the API access settings in the Google APIs Console) These are websites I accept requests from.
3 - Ensuring that Google Maps API V3 service has been activated.
4 - Ensured that it is a key for browser apps.

Categories

Resources