此地图在 chrome 中完美运行,但在 IE 和 FF 中显示如下;
这是我的代码:
<script src="http://maps.google.com/maps?file=api&v=2&key=AIzaSyBTbIpaaV72BfdUL3aOSU8dER1oUaso79o"></script>
<script type="text/JavaScript">
//<![CDATA[
function addLoadEvent(func)
{
var oldonload = window.onload;
if (typeof window.onload != 'function')
{
window.onload = func;
}
else
{
window.onload = function()
{
if (oldonload)
{
oldonload();
}
func();
}
}
}
addLoadEvent(load);
//]]>
</script>
<div id="map" style="width:970px; height:600px; border: 1px solid #000; margin:0 auto;" ></div>