terriajs
Version:
Geospatial data visualization platform.
31 lines • 1.17 kB
JavaScript
import Resource from "terriajs-cesium/Source/Core/Resource";
export default function loadWithXhr(options) {
// Take advantage that most parameters are the same
const resource = new Resource(options);
// @ts-expect-error Calling "private" method without type declaration.
return resource._makeRequest({
responseType: options.responseType,
overrideMimeType: options.overrideMimeType,
method: options.method ?? "GET",
data: options.data
});
}
Object.defineProperties(loadWithXhr, {
load: {
get: function () {
// @ts-expect-error Calling "private" method without type declaration.
return Resource._Implementations.loadWithXhr;
},
set: function (value) {
// @ts-expect-error Calling "private" method without type declaration.
Resource._Implementations.loadWithXhr = value;
}
},
defaultLoad: {
get: function () {
// @ts-expect-error Calling "private" method without type declaration.
return Resource._DefaultImplementations.loadWithXhr;
}
}
});
//# sourceMappingURL=loadWithXhr.js.map