It is necessary to use a google Maps API KEY? #479
Comments
Apparently is a new warning from Google Maps, but creating a Google Maps API Key is simple and free: https://developers.google.com/maps/documentation/javascript/get-api-key |
same issue here.... the weird thing is that it runs ok from my desktop but it complains about the api key on the hosting server I do not know where I have to insert the api key? |
Even weirder. Yhe same errors are in the javascript console. Only locally it even shows the map, but remote it says Oops something wrong |
"Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys" util.js:211:12 |
parijke Hey did you find the solution for this??? if so then please share the documentation |
Yes, I had te create an API key and add it to the url like <script type="text/javascript" src="https://maps.google.com/maps/api/js?key=this-is-the-generated-api-key"></script> |
|
Thank you for the reply <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap" type="text/javascript"></script> and sir what about the sensor=false |
@sachinsky, |
Hi , Please help me out for this ?? |
parijke Can u give me any solutions for this ? |
@sonamdewangan Did you do the part where you restrict the key? https://developers.google.com/maps/documentation/javascript/get-api-key#restrict_key Something that happened to me a lot was that I thought I added the referer but I needed to confirm adding it. |
@hpneo and added the refferer and checked for like And currently testing without refferer Now it is asking for billing account. |
You need to follow that guide: https://developers.google.com/maps/gmp-get-started#create-billing-account and then enable the Geocoding API for that API key. |
Ok @hpneo |
my code is blow hh
|
Which error are you getting? |
It is my code below
It is working now,since I open Maps JavaScript API.
Thanks for your kindness.
<!DOCTYPE html>
<html>
<head>
<script defer
src="https://maps.googleapis.com/maps/api/js?v=3&key=mykey&libraries=geometry&callback=initMap">
</script>
<script type="text/javascript">
function initMap(){
srcLocation = new google.maps.LatLng(19.075984, 72.877656);
dstLocation = new google.maps.LatLng(12.971599, 77.594563);
//alert(srcLocation);
var distance = google.maps.geometry.spherical.computeDistanceBetween(srcLocation, dstLocation);
alert(distance+"JJ");
//document.getElementById("map").value=distance;
//document.write(distance/1000); // Distance in Kms.
}
//initMap();
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
…-----Original message-----
From:Gustavo Leon<notifications@github.com>
To:hpneo/gmaps<gmaps@noreply.github.com>
Cc:hotsimmy<hotsimmy@mail2000.com.tw>,Comment<comment@noreply.github.com>
Date: Tue, 17 Nov 2020 23:28:56
Subject: Re: [hpneo/gmaps] It is necessary to use a google Maps API KEY? (#479)
Which error are you getting?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
張健鴻 (Albert)
Email:hotsimmy@mail2000.com.tw
MSN:hotsimmy1226@hotmail.com
Mobile:0931228890
|
I was testing an application, and by chance I saw the browser console and It had a warning:
"Google Maps API warning: No ApiKeys"
I've followed the link and it just says:
I've been using simply:
If I upload my code to a server, I'll have some problem if I don't have that key?
The text was updated successfully, but these errors were encountered: