Google Maps JavaScript API v3 - Getting Started [duplicate] - google-maps

This question already has answers here:
The key provided is not a valid Google API Key
(5 answers)
Closed 8 years ago.
I copy-pasted an example from the Google Maps Get Started page
into Notepad and include my newly created API key.
When I run it, it gives me the error:
google disable use of the map API for this application. The provided key is not valid google API key
How can I fix this?

What API version are you using v2 or v3 ? A key for V3 is not necessary to start.
Perhaps did you mix a v2 key with a v3 key or vice-versa ?
Please paste / copy the code you use.

Related

Display google maps without exposing api-key [duplicate]

This question already has answers here:
How do I securely use Google API Keys
(2 answers)
How do I create environment variables to protect my Google Maps API Key(or any other secret value) for my website?
(2 answers)
Closed 2 years ago.
My question is how to display the google map without exposing the api-key in the front end.
For retrieving simple JSON response from google i can store the api-key on my server and then using fetch in my react Frontend retrieve data from google over my server. e.g.:
react front <-> myServer [gmap api key] <-> google
fetch/axios('requestToMyServer').then(display Response)
However cant figure out so simple how to dsiplay the actual map.
Storing the API-Key in the .env as a variable is not a solution, if I can simply console.log(varName) from the client and abuse the key.
All kinds of hints, suggestions and solutions are welcome.
Thank you all in advance <3

MissingKeyMapError, related to domains? [duplicate]

This question already has answers here:
ERROR: Google Maps API error: MissingKeyMapError
(7 answers)
Closed 6 years ago.
I am Using Google Maps API to display google reviews. Works on our development domain but when I update the vhost to a different production domain it fails. I don't get why it would matter if I uses our.dev.com or our.site.com. Has anyone seen this before ? It's not a server issue as I can replicate the problem on the same box.
Browser Console:
js?libraries=places:34 Google Maps API error: MissingKeyMapError
https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
_.kb # js?libraries=places:34
EDIT: THIS IS NOT A DUPLICATE QUESTION as it does not match the same problem. This DOES work at times depending on the domain opposed to the "duplicate" question that doesn't work at all.
Google Maps JavaScript API requires an API key.
You can find description of the error in the documentation:
MissingKeyMapError The script element that loads the API is missing the required authentication parameter. If you are using the standard Maps JavaScript API, you must use a key parameter with a valid API key. If you are a Premium Plan customer, you must use either a client parameter with your client ID or a key parameter with a valid API key.
https://developers.google.com/maps/documentation/javascript/error-messages
An API key was announced as mandatory parameter on June 22, 2016:
https://maps-apis.googleblog.com/2016/06/building-for-scale-updates-to-google.html
Domains that were known before June 22, 2016 were "grandfathered", so they allow keyless access, but new domains created after June 22, 2016 must use API keys.

Google Maps API error: RefererNotAllowedMapError [duplicate]

This question already has answers here:
Google Maps JavaScript API RefererNotAllowedMapError
(32 answers)
Closed 4 years ago.
We have a new website(say www.website.com) on Server B which is not live yet, which is using google maps on a page.
The old version of the website is on Server A is not using google maps.
I have created a browser key with domain name - www.website.com and in my hosts file set the IP address of Server B with www.website.com and tried to test google maps, but it is not working.
This is the error I am getting -
"Google Maps API error: Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://www.website.com/page-that-has-google-map
Any suggestions on how to fix this issue? I want to test the google maps page on Server B and make sure the page is working fine before making the website on Server B live.
TIA
the website name is www.website.com, but I added website.com, so when I added *.website.com/* to browser key API, that fixed the issue.

Integrating Google Maps in OBIEE

I come to you in the hope of finding a solution to a problem I encountered when I embed Google Maps in OBIEE.
Indeed, after following the standard procedure defined on this link:
http://onlyobi.blogspot.fr/2014/03/obiee-11g-google-map-integration-guest.html
I get the following error appears in OBIEE:
"Google has disabled use of the Google Maps API for this application. The key provided is not a valid Google API key or is not a licensed version 3 API key
Google Maps Javascript on this site. If you are the owner of this applicatio, please go to ... "
Thank you for your support,
Have you tried using the maps visualization from Google? More details here:
https://developers.google.com/chart/interactive/docs/gallery/map
We use this in OBIEE to display certain data on maps.
Using MapViewer, we can integrate google maps with the OBIEE 11g/12c. More details is here:
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=363666329275914&parent=EXTERNAL_SEARCH&sourceId=HOWTO&id=1485088.1&_afrWindowMode=0&_adf.ctrl-state=rota6my7h_102

Google maps: how to generate a key for Google Maps v2?

I have an old website that uses Google maps v2. Previously the website was running under http://domain1.edu. Now it is runs under http://domain2.edu. It appears that I need to update the map key.
On the internet, I was looking for how to do this. I find incomplete info at Google's own website. Here is the link for v2 map key: https://developers.google.com/maps/documentation/javascript/v2/introduction?csw=1#Obtaining_Key
It says:
To create your API key, visit the APIs Console at https://code.google.com/apis/console and log in with your Google Account.
Click the Services link from the left-hand menu, then activate the Google Maps API v2 service.
Once the service has been activated, your API key is available from the API Access page, in the Simple API Access section. Maps API applications use the Key for browser apps
First, I am unable to find "Google Maps API v2" service mentioned above. I am able to find Google Maps API v3, and so I enabled it. I used the key mentioned at https://developers.google.com/maps/documentation/javascript/tutorial#api_key
However, the website key is still not working.
Here is the page with Google map: http://nmai.si.edu/nafvf/attend.aspx
Anyone knows how to fix this?
Thanks and regards!
You are using the deprecated Google Maps Javascript API v2, those keys are no longer available (as the documentation you point to indicates). You need to use a v3 key, and make sure you have the referrers set correctly for that key (you really should update your map to use the v3 API...)
working example (copied from Mike Williams' v2 tutorial, just changed the key)
This link says how to generate the key for android. You need to get the SHA1 of your signing key and then gotto google console to generate the key.