OpenLayers 3.15.1 - 无法获取 属性 'add' 的值
OpenLayers 3.15.1 - Unable to get value of the property 'add'
加载地图时引入的新错误:
OpenLayers 3.15.1 - 无法获取 属性 'add'.
的值
错误在以下 ol-debug.js 行中:
this.element.classList.add(ol.css.CLASS_HIDDEN);
/**
* @private
* @type {number|undefined}
*/
this.rotation_ = undefined;
if (this.autoHide_) {
this.element.classList.add(ol.css.CLASS_HIDDEN);
}
};
goog.inherits(ol.control.Rotate, ol.control.Control);
OpenLayers 3.13.0 中没有出现错误
我正在使用 jquery-1.11.2.min.js
更新 #1
问题只发生在 IE9
答案:
OpenLayers 3.14.0 及更新版本不再支持开箱即用的 IE9。支持 IE9 的最新开箱即用 OpenLayers 版本是 v3.13.1。我将暂时使用 v3.13.1,直到我的所有用户都使用 IE10+
您在使用 classList polyfill 吗?根据 openlayers 3.15 的发行说明:
As of this release, OpenLayers requires a classList polyfill for IE 9
support. See
http://cdn.polyfill.io/v2/docs/features#Element_prototype_classList.
更多信息请见https://github.com/openlayers/ol3/releases/tag/v3.15.0
加载地图时引入的新错误:
OpenLayers 3.15.1 - 无法获取 属性 'add'.
的值错误在以下 ol-debug.js 行中:
this.element.classList.add(ol.css.CLASS_HIDDEN);
/**
* @private
* @type {number|undefined}
*/
this.rotation_ = undefined;
if (this.autoHide_) {
this.element.classList.add(ol.css.CLASS_HIDDEN);
}
};
goog.inherits(ol.control.Rotate, ol.control.Control);
OpenLayers 3.13.0 中没有出现错误
我正在使用 jquery-1.11.2.min.js
更新 #1 问题只发生在 IE9
答案:
OpenLayers 3.14.0 及更新版本不再支持开箱即用的 IE9。支持 IE9 的最新开箱即用 OpenLayers 版本是 v3.13.1。我将暂时使用 v3.13.1,直到我的所有用户都使用 IE10+
您在使用 classList polyfill 吗?根据 openlayers 3.15 的发行说明:
As of this release, OpenLayers requires a classList polyfill for IE 9 support. See http://cdn.polyfill.io/v2/docs/features#Element_prototype_classList.
更多信息请见https://github.com/openlayers/ol3/releases/tag/v3.15.0