IE8中文语言环境中的GoogleMap v2错误

时间:2011-10-25 13:53:21

标签: google-maps internationalization cjk

这是一个简单的代码,它不适用于具有中文语言环境的https服务器上的IE8:

<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
   <title>Google Maps JavaScript API Example</title>
   <script src="https://maps.google.com/maps?file=api&amp;v=2&amp;key=${googleMapKey}"
        type="text/javascript"></script>
   <script type="text/javascript">

function initialize() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
    map.setUIToDefault();
  }
}

</script>
</head>
<body onload="initialize()" onunload="GUnload()">
  <div id="map_canvas" style="width: 500px; height: 300px"></div>
</body>
</html>

有没有人可以提供帮助?

1 个答案:

答案 0 :(得分:0)

key=${googleMapKey}

此时不应该有实际的API密钥吗?