admin管理员组文章数量:1327078
I have generated a Google Maps Javascript API v3 key for my website treblecode, and have added www.treblecode to the list of referrers on my developer account. I've also tried .treblecode/ to no avail.
However, in attempting to create a test HTML page according to the Hello World guidelines at developers.google/maps/documentation/javascript/tutorial#api_key, I receive the following error:
"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. If you are the owner of this application, you can learn about obtaining a valid key here: "
Below is the code I currently have on my test page at .html:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body, #map-canvas { height: 100%; margin: 0; padding: 0;}
</style>
<script type="text/javascript" src="">
</script>
<script type="text/javascript">
function initialize() {
var mapOptions = {
center: { lat: -34.397, lng: 150.644},
zoom: 8
};
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>
If it helps, my hosting provider is GoDaddy.
Any help would be appreciated here, as I'm not sure what else I need to do to properly work with that API.
I have generated a Google Maps Javascript API v3 key for my website treblecode., and have added www.treblecode. to the list of referrers on my developer account. I've also tried .treblecode./ to no avail.
However, in attempting to create a test HTML page according to the Hello World guidelines at developers.google./maps/documentation/javascript/tutorial#api_key, I receive the following error:
"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. If you are the owner of this application, you can learn about obtaining a valid key here: https://developers.google./maps/documentation/javascript/tutorial#api_key"
Below is the code I currently have on my test page at http://www.treblecode./apis/quickmap.html:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body, #map-canvas { height: 100%; margin: 0; padding: 0;}
</style>
<script type="text/javascript" src="https://maps.googleapis./maps/api/js?key=REDACTED">
</script>
<script type="text/javascript">
function initialize() {
var mapOptions = {
center: { lat: -34.397, lng: 150.644},
zoom: 8
};
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>
If it helps, my hosting provider is GoDaddy.
Any help would be appreciated here, as I'm not sure what else I need to do to properly work with that API.
Share Improve this question asked Nov 7, 2014 at 15:08 trebleCodetrebleCode 2,3282 gold badges24 silver badges35 bronze badges 1- Any updates you have to fix it? – Ananth Ramasamy Meenachi Commented Nov 10, 2014 at 4:44
3 Answers
Reset to default 4EDIT 27 july 2016
So, I said this at a time, not long ago, when this was true. It is not true anymore. Websites that were working perfectly in may 2016, stopped working suddenly.
So please disregard the text you see below.
You don't need the key. Just load "https://maps.googleapis./maps/api/js"
The Emmanuel's answer is outdated.
From June 22nd, 2016. Google requires an api key for Google Maps
- You have to go to Google Console and create a new project.
- Credentials > Create credentials > API Key
I'm not sure, how it resolved but I did the below steps, it worked.
- Go to https://console.developers.google./project/
- Created a new project and named it
- Go to "APIs & Auth" --> Push menu and add your domain name
本文标签: Google Maps Javascript API v3 Error Message quotKey is DisabledquotStack Overflow
版权声明:本文标题:Google Maps Javascript API v3 Error Message "Key is Disabled" - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742211715a2433834.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论