Skip to main content
Generating imagery basemaps in the browser
Imagery Basemaps
From Implementation To Implementation
Python
Golang
WASI
- Failure when trying to get both go-tilepacks and go-pmtiles to work with WASI
- The problem is the underlying SQLite libraries
- ncruces (based on WAZero) worked to compile, but the main issue is filesystem access for writing sqlite from WASI
- WASI can in theory write to the filesystem, but this needs to be code output --> filesystem
- The problem is the compiled SQLite code here is trying to access the .sqlite file directly from WASI, which doesn’t seem to work
- Couldn’t work this out
- Tried many approaches for building go-pmtiles as WASI too, ending in failure: https://github.com/spwoodcock/go-pmtiles/tree/build/wasi
- TinyGO
- Standard Go compiler
- Using many different C compilers including Zig
- Concluded we probably need to use SQLite WASM builds for pulling actual file interaction in JS?
JavaScript
- Back to basics
- Using WASM SQLite - facilitated this - to write MBTiles
- Need custom code to write MBTiles --> PMTiles… as the WASI build failed