Commit 37925ef4 authored by Giuseppe La Scaleia's avatar Giuseppe La Scaleia

Add changes for OL 2.11

parent 8dda6926
......@@ -82,7 +82,8 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
*/
initialize: function(options) {
if(window.ActiveXObject) {
this.xmldom = new ActiveXObject("Microsoft.XMLDOM");
// this.xmldom = new ActiveXObject("Microsoft.XMLDOM");
this.xmldom = this._getIEXmlDom();
}
OpenLayers.Format.prototype.initialize.apply(this, [options]);
// clone the namespace object and set all namespace aliases
......@@ -93,6 +94,41 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
}
},
/** PrivateFunction: _getIEXmlDom
* Gets IE xml doc object
*
* Returns:
* A Microsoft XML DOM Object
* See Also:
* http://msdn.microsoft.com/en-us/library/ms757837%28VS.85%29.aspx
*/
_getIEXmlDom : function() {
var doc = null;
var docStrings = [
"Msxml2.DOMDocument.6.0",
"Msxml2.DOMDocument.5.0",
"Msxml2.DOMDocument.4.0",
"MSXML2.DOMDocument.3.0",
"MSXML2.DOMDocument",
"MSXML.DOMDocument",
"Microsoft.XMLDOM"
];
for (var d = 0; d < docStrings.length; d++) {
if (doc === null) {
try {
doc = new ActiveXObject(docStrings[d]);
} catch (e) {
doc = null;
}
} else {
break;
}
}
return doc;
},
/**
* APIMethod: destroy
* Clean up.
......
......@@ -1070,7 +1070,7 @@ OpenLayers.Map = OpenLayers.Class({
}
}
this.resetLayersZIndex();
// this.resetLayersZIndex();
this.events.triggerEvent("removelayer", {layer: layer});
layer.events.triggerEvent("removed", {map: this, layer: layer});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment