Don't rely on getResponseXml
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
goog.provide('ol.source.VectorFile');
|
goog.provide('ol.source.VectorFile');
|
||||||
|
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
|
goog.require('goog.dom.xml');
|
||||||
goog.require('goog.net.XhrIo');
|
goog.require('goog.net.XhrIo');
|
||||||
goog.require('ol.format.FormatType');
|
goog.require('ol.format.FormatType');
|
||||||
goog.require('ol.proj');
|
goog.require('ol.proj');
|
||||||
@@ -83,6 +84,9 @@ ol.source.VectorFile.prototype.handleXhrIo_ = function(event) {
|
|||||||
source = xhrIo.getResponseText();
|
source = xhrIo.getResponseText();
|
||||||
} else if (type == ol.format.FormatType.XML) {
|
} else if (type == ol.format.FormatType.XML) {
|
||||||
source = xhrIo.getResponseXml();
|
source = xhrIo.getResponseXml();
|
||||||
|
if (goog.isNull(source)) {
|
||||||
|
source = goog.dom.xml.loadXml(xhrIo.getResponseText());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
goog.asserts.fail();
|
goog.asserts.fail();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user