Untie feature loader and XML code

This commit is contained in:
Guillaume Beraudo
2018-03-01 09:14:20 +01:00
parent 71a609d8d5
commit cb539bce98

View File

@@ -3,7 +3,6 @@
*/
import {nullFunction} from './index.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);