Don't use getResponseXml() on IE
This commit is contained in:
@@ -4,6 +4,7 @@ goog.provide('ol.source.VectorFile');
|
|||||||
|
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
goog.require('goog.net.XhrIo');
|
goog.require('goog.net.XhrIo');
|
||||||
|
goog.require('goog.userAgent');
|
||||||
goog.require('ol.format.FormatType');
|
goog.require('ol.format.FormatType');
|
||||||
goog.require('ol.proj');
|
goog.require('ol.proj');
|
||||||
goog.require('ol.source.State');
|
goog.require('ol.source.State');
|
||||||
@@ -94,8 +95,10 @@ ol.source.VectorFile.prototype.handleXhrIo_ = function(event) {
|
|||||||
} else if (type == ol.format.FormatType.TEXT) {
|
} else if (type == ol.format.FormatType.TEXT) {
|
||||||
source = xhrIo.getResponseText();
|
source = xhrIo.getResponseText();
|
||||||
} else if (type == ol.format.FormatType.XML) {
|
} else if (type == ol.format.FormatType.XML) {
|
||||||
source = xhrIo.getResponseXml();
|
if (!goog.userAgent.IE) {
|
||||||
if (goog.isNull(source)) {
|
source = xhrIo.getResponseXml();
|
||||||
|
}
|
||||||
|
if (!goog.isDefAndNotNull(source)) {
|
||||||
source = ol.xml.load(xhrIo.getResponseText());
|
source = ol.xml.load(xhrIo.getResponseText());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user