The following JavaScript with google maps error appeared: NotLoadingAPIFromGoogleMapsError - google-maps

Google Maps JavaScript API error: NotLoadingAPIFromGoogleMapsError
Any thoughts?

This error message:
Google Maps JavaScript API error: NotLoadingAPIFromGoogleMapsError
is a little misleading.
The description from the documentation:
NotLoadingAPIFromGoogleMapError
The Maps JavaScript API must be downloaded directly from Google's servers.
The script element that loads the Maps JavaScript API is not being included correctly on your page. In order for the API to work correctly, it must be loaded directly from https://maps.googleapis.com.
See Loading the Maps JavaScript API.
It also occurs when using the original location for the google maps API (which worked for years):
http://maps.google.com/maps/api/js
Changing that to (per the documentation link above):
https://maps.googleapis.com/maps/api/js
fixes the error.

Related

Google Maps JavaScript API error: ExpiredKeyMapError

I'm getting the error on the website Google API, so why happening is api not free or whats wrong even I enable the google javascript. Google Maps JavaScript API error: ExpiredKeyMapError
https://developers.google.com/maps/documentation/javascript/error-messages#expired-key-map-error
Based on the doc given on the error message, you usually get ExpiredKeyMapError when the API key you are using is not recognized by the system or already expired.
I suggest generating a new API key and using that new API key in your implementation instead. You can check the youtube tutorial - How to generate and restrict API keys for Google Maps Platform
If the error still persists, I suggest that you file a support case to Google Maps Support for further assistance.

How can I get Google maps to show on my website

I am unable to implement google maps on my website, despite generating an API key for it and configuring it correctly on the website.
http://josebaattard.com/about/
the console tells you the error:
Google Maps JavaScript API error: RefererNotAllowedMapError
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://josebaattard.com/about/
You have limited your API-Access to an certain url and this one is not allowed.

Google API Key for Google Maps in ZK Application from domain name

I have a ZK (Java Spring) application using Google Maps (gmaps). The version of ZK I am using is 7.0.3 EE.
In my application I didn't use a google API key, and since some time ago things seemed to work fine (I could correctly visualize the map).
It seems that since last july the use of an API key has become necessary, so I am trying to insert an API key.
So, I created a Browser API Key for my application, following the instruction at this https://support.google.com/cloud/answer/6158862?hl=en&ref_topic=6262490. Then, following the example at https://www.zkoss.org/zkdemo/reporting/google_map I added the following tag in my .zul page:
<script type="text/javascript" content="zk.googleAPIkey='my api key'" />
<gmaps ...>
</gmaps>
Note that if I access the web application from a local IP the map is correctly shown. If, on the other hand I access it through a registered domain name portal.mydomain.eu instead of the map I see a gray box with the following error message (note that in "Accept requests from these HTTP referrers (web sites)" I inserted my domain name as "*.mydomain.eu/"):
Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
The following are the Javascript console error messages (the messages are in Italian, I've inserted the english translation below each line where relevant):
GET
http://portal.mydomain.eu/images/portal_footer.jpg [HTTP/1.1 404 Not Found 23ms]
L’API Fullscreen con prefisso è deprecata, al suo posto utilizzare l’API senza prefisso. Per ulteriori informazioni consultare https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API controls.js:23:54
***the Fullscreen API with prefix is deprecate, use insteass the API without a prefix. For further information ... ***
"Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error" js:35:350
"Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys" util.js:221:12
"Google Maps API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version" util.js:221:12
"Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required" util.js:221:12
"Google Maps API warning: InvalidClientId https://developers.google.com/maps/documentation/javascript/error-messages#invalid-client-id" util.js:221:12
L’utilizzo di getPreventDefault() è deprecato. Al suo posto utilizzare defaultPrevented.
***the usage of getPreventDefault() is deprecated. Use instead defaultPrevented.***
Any idea on what can I be doing wrong? Is it ok to have a "Browser Key" or do I need a different type of key?
edit:
I tried to replace the script tag with the one found at the link Whats the API Key for in Google Maps API V3?
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY" type="text/javascript"></script>
With this I see a white box instead of the gray one, and on the javascript console the error is now Google Maps API error: RefererNotAllowedMapError
Your answer to the updated question can be found on the documentation. Basically, RefererNotAllowedMapError indicates that the URL loading the API is not added to the list of referrers.
The current URL loading the Google Maps JavaScript API has not been added to the list of allowed referrers. Please check the referrer settings of your API key on the Google API Console.
See API keys in the Google API Console. For more information, see Best practices for securely using API keys.
There is a new version of gmaps just released
Try this version : 3.0.4.
https://www.zkoss.org/download/zkgmaps
You can try this code :
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"/> <gmaps>....</gmaps>
Also you have to upgrade your API from v2 to v3. Because Google Map up to Version 2 required API Key.
Get more details on this link.

Google does not permit the use of the Maps API for this application

Good day.
Now i create api Key for browser apps (with referers).
Referers: *.invait.ru/*
But on site i get error:
Google does not permit the use of the Maps API for this application.
API Google key provided is invalid or do not have permission to use it
with Google Maps JavaScript API v3 on this site.
Screenshot:
Tell me please why i get it error and how remove error and use google map api v3?
For domain use Referers: invait.ru/*

'GOverlay is undefined' javascript error in IE 7, in spite of having loaded the Google Maps API

Despite loading the Google Maps API, via this url:
http://maps.gstatic.com/intl/en_ALL/mapfiles/276b/maps2.api/main.js
I'm getting the above error.
Why is it that when I download that URL in my browser and do a find for 'GOverlay' I'm getting zero matches?
Have Google removed this from their API or something, causing all my code to break?
GOverlay is an essential part of the Google Maps API implementation, see the V2 documentation for GOverlay here.
The reason for you not finding "GOverlay" when searching through the Javascript file you provided is simply that the Google Maps API consists of several Javascript files, not all of the code is in main.js. Additionally the code is obfuscated which could mean the build GOverlay by concatenating some crazy strings.
On a basic note: Why do you want to use some static JS file? The offical way to use the Google Maps API is using a key, which you have to obtain by registering with your Google account. So actually the URL you should be using is:
http://maps.google.com/maps?file=api&v=2&key=abcdefg
Or use the AJAX loader as seen on the Google Maps V2 documentation here.
The code is actually loaded asynchronously.
Post a link to your page - it is more than likely that there's some issue with your code.