go-pmtiles to WASM #13
-
I wonder if anyone tried to compile go-pmtiles to Web Assembly? My end goal is to have My findings so far:
My current idea is to try output extract results back to JS as blob, so I can save it in browser storage. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
We would need to re-structure the go API to separate I/O, and then implement the I/O using fetch in javascript and pass to WASM. This isn't on the roadmap right now. An easier approach may be to implement the entire extract algorithm in JS. |
Beta Was this translation helpful? Give feedback.
-
This would be useful if it means local pmtiles can be accessed in the browser and used as a map (without requiring range requests or an actual server). |
Beta Was this translation helpful? Give feedback.
-
The thing is, I hope it can be less intrusive (e.g. skip the manual drag
and drop and able to register a fixed list of local files via inline
JavaScript, like how DuckDB wasm manages it with registerFileHandle:
https://duckdb.org/docs/api/wasm/data_ingestion
…On Thu, Sep 5, 2024, 1:06 PM Brandon Liu ***@***.***> wrote:
It's already possible to access local PMTiles if you have the entire thing
on disk or local storage using the existing JavaScript client and File API
<https://developer.mozilla.org/en-US/docs/Web/API/File_API>.
https://pmtiles.io can open local files.
—
Reply to this email directly, view it on GitHub
<#13 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFEBYUA5O2CCQMDAUCGWSLZU7RGBAVCNFSM6AAAAABFIL43ZOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANJVGMYTEMI>
.
You are receiving this because you commented.Message ID: <protomaps/.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
We would need to re-structure the go API to separate I/O, and then implement the I/O using fetch in javascript and pass to WASM. This isn't on the roadmap right now. An easier approach may be to implement the entire extract algorithm in JS.