加载地图时,我收到此错误替代文本 http://img239.imageshack.us/img239/6936/jserror.png 。
错误在此行的原始未修改 OpenLayers.js 文件中:
return!!(document.namespaces);
我尝试将其重写为:
return (typeof(document.namespaces) != 'undefined');
并且它起作用了,但是在进一步引用 document.namespaces 时,我得到了相同的“未指定”错误:
if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns); ...
我尝试将其重写为:
if(typeof(document.namespaces.olv) == 'undefined') { ...
但我得到相同的“未指定错误”。
我只在 Internet Explorer(我在 7 上测试过)而不是 Firefox 上收到此错误。
有什么线索吗?
谢谢。