问题描述
我遵循了有关如何为浏览器生成API密钥的Google教程,但是由于密钥无效错误,我无法加载地图。
在我的情况下,没有发布到相关问题的解决方案。
这是我的代码:
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>myTitle</title>
<script src="https://maps.googleapis.com/maps/api/js?key=MYKEY"
type="text/javascript"></script>
</head>
Web控制台日志:
"ApiNotActivatedMapError: https://developers.google.com/maps/documentation/javascript/tutorial#api_key" main.js line 61 > eval:50:381
Nr/this.j</<() main.js line 61 > eval:50
as</<() main.js line 61 > eval:54
Ar/d() main.js line 61 > eval:43
<anonymous> AuthenticationService.Authenticate:1
1楼
torrento
1
2015-09-15 07:18:01
您使用的是地方图书馆或地理编码之类的图书馆吗?
删除API密钥,然后尝试。
如果使用,请尝试-
<script src="http://maps.google.com/maps/api/js?sensor=false&libraries=places"></script>
如果不使用,请尝试-
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>