Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/438.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 谷歌地图JS API v3-UrlAuthentication_Javascript_Google Maps_Google Maps Api 3 - Fatal编程技术网

Javascript 谷歌地图JS API v3-UrlAuthentication

Javascript 谷歌地图JS API v3-UrlAuthentication,javascript,google-maps,google-maps-api-3,Javascript,Google Maps,Google Maps Api 3,前几天我在本地主机上测试GoogleMapsJSAPI,没有任何问题。从今天起我开始犯错误 UrlAuthenticationCommonError: 坦率地说,这个错误甚至没有在那个URL上描述。我猜是Url认证出了问题(我知道,我是天才)。我将localhost包括在允许的引用中。错误还在这里 我在azure上上传了这个网站。在允许的推荐人中包含url,但仍然为空。一次又一次地犯同样的错误 不幸的是,谷歌并不是很有帮助 以防万一这是代码。直接从演示页面复制/通过。同样的代码昨天起作用,但今天

前几天我在本地主机上测试GoogleMapsJSAPI,没有任何问题。从今天起我开始犯错误

UrlAuthenticationCommonError:

坦率地说,这个错误甚至没有在那个URL上描述。我猜是Url认证出了问题(我知道,我是天才)。我将localhost包括在允许的引用中。错误还在这里

我在azure上上传了这个网站。在允许的推荐人中包含url,但仍然为空。一次又一次地犯同样的错误

不幸的是,谷歌并不是很有帮助

以防万一这是代码。直接从演示页面复制/通过。同样的代码昨天起作用,但今天不起作用

function  init(params) {

var mapOPtions = {
    center: { lat: -34.397, lng: 150.644},
    zoom:8
}

var map = new google.maps.Map(document.getElementById("map"), mapOPtions)
}




<html>
<head>
    <title>Proto Wars</title>
    <style>
        html, body, #map { height: 100%; margin: 0; padding: 0;}
    </style>
</head>

<body>
    <script type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC-MmP-PKBmtLOobOynyJQvlBpYzp84Tr0">
</script>
    <script src="script.js"></script>


        <div id="map" style="background-color: #000"></div>
</body>
函数初始化(参数){
变量映射选项={
中心:{纬度:-34.397,液化天然气:150.644},
缩放:8
}
var map=new google.maps.map(document.getElementById(“map”),mapOPtions)
}
原始战争
html,body,#map{height:100%;margin:0;padding:0;}