我玩谷歌地圖apis下面的谷歌地圖教程https://developers.google.com/maps/tutorials/fundamentals/adding-a-google-map 但與以下代碼地圖不顯示在我的HTML代碼示例。嵌入谷歌地圖不顯示在HTML頁面
有什麼建議嗎?
問候
<html>
<head>
<style>
#map_canvas {
width: 500px;
height: 400px;
}
</style>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
function initialize() {
var map_canvas = document.getElementById('map_canvas');
var map_options = {
center: new google.maps.LatLng(44.5403, -78.5463),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(map_canvas, map_options)
}
google.maps.event.addDomListener(window, ‘load’, initialize);
</script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html>
的[谷歌地圖API的例子不工作,給我黑屏]可能重複(http://stackoverflow.com/questions/18196229/google-maps-api-example-not-working - 給我空白屏幕) – geocodezip