Skip to content

Commit

Permalink
fix(tile-converter): CesiumION tileset URL (#2560)
Browse files Browse the repository at this point in the history
  • Loading branch information
belom88 committed Jul 21, 2023
1 parent b94d4bd commit eb52b2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/tile-converter/src/i3s-converter/i3s-converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,15 @@ export default class I3SConverter {
'draco-nodejs': {workerUrl: './modules/draco/dist/draco-nodejs-worker.js'}
}
};
let tilesetUrl = inputUrl;
if (preloadOptions.url) {
tilesetUrl = preloadOptions.url;
}
if (preloadOptions.headers) {
tilesetOptions.loadOptions!.fetch = {headers: preloadOptions.headers};
}
Object.assign(tilesetOptions, preloadOptions);
const sourceTilesetJson = await load(inputUrl, this.Loader, tilesetOptions.loadOptions);
const sourceTilesetJson = await load(tilesetUrl, this.Loader, tilesetOptions.loadOptions);
// console.log(tilesetJson); // eslint-disable-line
this.sourceTileset = new Tileset3D(sourceTilesetJson, tilesetOptions);

Expand Down

0 comments on commit eb52b2b

Please sign in to comment.