首页 文章

Google Maps V3拒绝我的请求

提问于
浏览
1

上午我试图在浏览器中加载谷歌 Map

Google Maps API服务器拒绝了您的请求 . 请求中指定的“sensor”参数必须设置为“true”或“false” .

我的代码可能有什么问题?

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0; padding: 0 }
      #map-canvas { height: 100% }
    </style>

    <script type="text/javascript" 
    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDHlCzPPFeUds2erogWbvRZreRC3PX-BJE&sensor=FALSE">
    </script>

      <script type="text/javascript">
      function initialize() {
        var mapOptions = {
          center: new google.maps.LatLng(-34.397, 150.644),
          zoom: 8,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        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>

1 回答

  • 1

    我在这里,但你尝试将它改为 https://maps.googleapis.com/maps/api/js?key=AIzaSyDHlCzPPFeUds2erogWbvRZreRC3PX-BJE&sensor=false < - 小案例

相关问题