小编Ali*_*lin的帖子

打开图层中的Javascript"未指定的错误"

我在地图加载时收到此错误alt文本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中.

有线索吗?

谢谢.

javascript map openlayers

8
推荐指数
2
解决办法
5879
查看次数

标签 统计

javascript ×1

map ×1

openlayers ×1