-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix BaseUrl issue with lab/lite - Load gdal at startup and only once
- Loading branch information
1 parent
87ceddb
commit 80c859e
Showing
5 changed files
with
24 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import initGdalJs from 'gdal3.js'; | ||
|
||
export async function getGdal() { | ||
const dataurl = new URL('./gdal3WebAssembly.data', import.meta.url); | ||
const wasmurl = new URL('./gdal3WebAssembly.wasm', import.meta.url); | ||
|
||
// TODO Pass gdal JS too and run gdal in a worker? | ||
return await initGdalJs({ | ||
paths: { | ||
wasm: wasmurl.href, | ||
data: dataurl.href | ||
}, | ||
useWorker: false | ||
}); | ||
} | ||
|
||
// Early load gdal | ||
getGdal(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters