以下是我的代码我一直收到您在此页面上多次包含Google Maps API错误。
我使用了Google天气覆盖图和自定义标记覆盖图
<!DOCTYPE html>
<html>
<head>
<style>
html, body, #map {
height: 100%;
margin: 0px;
padding: 0px
}
#panel {
position: absolute;
top: 5px;
left: 50%;
margin-left: -500px;
z-index: 5;
background-color: transparent;
padding: 5px;
//border: 1px solid #999;
}
</style>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=AIzaSyD2ldpYgQrMTO6w9k-f9x0FhKlnB7n6pQ03.exp"></script>
<script type ="text/javascript" src ="Assignment.js"> </script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=true_or_false"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=drawing"></script>
</head>
<body>
<div id="panel">
<button type="button" onclick="setHYB()">Hybrid Mode</button>
<button type="button" onclick="setRoad()">Road Mode</button>
<button type="button" onclick="zoomTo()">Choose Your Location</button>
<button type="button" onclick="zoomIn()">Zoom In</button>
<button type="button" onclick="zoomOut()">Zoom Out</button>
<button type="button" id="weather" >Weather On or Off</button>
<button type="button" onclick="addMarker()">Add your own Marker</button>
<button type="button" onclick="clearMarkers()">Clear Own Markers</button>
<button type="button" onclick="showMarkers()">Show Markers</button>
<button type="button" onclick="deleteMarkers()">Delete Markers</button>
</div>
<div id="map"></div>
</body>
</html>
&#13;
我做错了吗? 我错过了什么吗?
答案 0 :(得分:-1)
这里你需要指出true或false no true_false
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=true_or_false"></script>