-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: slpk from local filesystem feature #377
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
@belom88 Please review as soon as you can |
const fileSystem = new ZipFileSystem(archive); | ||
options.fetch = fileSystem.fetch.bind(fileSystem) as (filename: string) => Promise<Response>; | ||
} catch (e) { | ||
console.log("error", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("error", e); | |
console.error(e); |
src/pages/viewer-app/viewer-app.tsx
Outdated
@@ -238,8 +248,9 @@ export const ViewerApp = () => { | |||
setSelectedFeatureAttributes(null); | |||
setSelectedFeatureIndex(-1); | |||
if (buildingExplorerOpened && tilesetsData[0]) { | |||
const tilesetDataUrl = typeof tilesetsData[0].url === "string" ? tilesetsData[0].url : tilesetsData[0].url.name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some utility function getDatasetUrl(dataset: LayerExample | TilesetMetadata) => string
. You reuse this pattern many times. This function would make the code more readable.
const tilesetDataUrl = typeof tilesetsData[0].url === "string" ? tilesetsData[0].url : tilesetsData[0].url.name; | |
const tilesetDataUrl = getDatasetUrl(tilesetsData[0]); |
let params = { tilesetUrl: "" as string | File, token: "" }; | ||
if (typeof layer.url === "string") { | ||
params = parseTilesetUrlParams(layer.url, layer); | ||
} else { | ||
params.tilesetUrl = layer.url; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this part is different in src/pages/debug-app/debug-app.tsx
and src/components/comparison/comparison-side/comparison-side.tsx
?
src/utils/layer-utils.ts
Outdated
@@ -95,7 +95,7 @@ export const findExampleAndUpdateWithViewState = ( | |||
|
|||
for (const example of examplesCopy) { | |||
// We can't compare by tileset.url === example.url because BSL and Scene examples url is not loaded as tileset. | |||
if (tileset.url.includes(example.url) && !example.viewState) { | |||
if (tileset.url.includes(typeof example.url === "string" ? example.url : example.url.name) && !example.viewState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (tileset.url.includes(typeof example.url === "string" ? example.url : example.url.name) && !example.viewState) { | |
if (tileset.url.includes(getLayerUrl(example.url)) && !example.viewState) { |
First part of changes for slpk from local filesystem feature