@dde-earth/plugin-tiff-loader
Version:
29 lines (26 loc) • 754 B
JavaScript
import { BasePlugin, deepMerge } from 'dde-earth';
import { defaultRenderOptions } from './constant.js';
class TIFFLayerLoader extends BasePlugin {
defaultRenderOptions;
constructor(options) {
super(options);
this.defaultRenderOptions = deepMerge(
defaultRenderOptions,
options?.defaultRenderOptions
);
}
init(earth) {
this._init(earth);
this.earth.layerManager.addLoader({
tiff: async (earth2, data) => {
const { TIFFLayerItem } = await import('./TIFFLayerItem.js');
return new TIFFLayerItem(earth2, data, {
defaultRenderOptions: this.defaultRenderOptions
});
}
});
return this;
}
}
export { TIFFLayerLoader };
//# sourceMappingURL=TIFFLayerLoader.js.map