。當我測試它簡單的HTML文件(出來的項目 - 在本地),它的工作原理,但是當我在我的項目aspx頁面上使用此代碼,它不能找到「谷歌」。我該如何解決它?下面是我使用的代碼:谷歌地圖說不確定的谷歌,而這是aspx頁面
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Map</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css"> html { height: 100% } body { height: 100%; margin: 0px;
padding: 0px } #map_canvas { height: 100% } </style>
<script type="text/javascript" src="http:\\maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 8, center: latlng, mapTypeId:
google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width: 100%; height: 100%">
</div>
</body>
</html>
此線 「變種經緯度=新** **谷歌maps.LatLng(-34.397,150.644);」給出錯誤 – abkaplan1
這是錯誤:0x800a1391 - JavaScript的運行時錯誤:「谷歌」是未定義 – abkaplan1
請一些幫助 – abkaplan1