Merge pull request #7915 from gberaudo/untie_featureloader_from_xml_code

Untie feature loader and XML code
This commit is contained in:
Tim Schaub
2018-03-03 13:03:28 -07:00
committed by GitHub

View File

@@ -3,7 +3,6 @@
*/
import {UNDEFINED} from './functions.js';
import FormatType from './format/FormatType.js';
import {parse} from './xml.js';
/**
@@ -48,7 +47,7 @@ export function loadFeaturesXhr(url, format, success, failure) {
} else if (type == FormatType.XML) {
source = xhr.responseXML;
if (!source) {
source = parse(xhr.responseText);
source = new DOMParser().parseFromString(xhr.responseText, 'application/xml');
}
} else if (type == FormatType.ARRAY_BUFFER) {
source = /** @type {ArrayBuffer} */ (xhr.response);