Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Import new maps on web#1014

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
dabreegster wants to merge10 commits intomain
base:main
Choose a base branch
Loading
fromwasm_importer
Draft

Import new maps on web#1014

dabreegster wants to merge10 commits intomainfromwasm_importer

Conversation

dabreegster
Copy link
Collaborator

Importing new areas works only on the native version today. For#1009 and other reasons, it could be nice to do this on the web too, even though it'd be slow and someone would have to re-import the map every single session, even when switching apps.

The complication is that we can't just include the extra dependencies in all of the app executables; it would increase initial loading time, even for the common case of only using pre-imported maps. On native, we split out acli binary and call it as a subprocess. The approach in this PR is the same -- we can dynamically load a JS+WASM module and bring in the extra dependencies.

This PR is a draft because it's still not working. The two big problems:

  1. When I try to turn aMap into bincoded bytes to pass back to JS, it freezes and I can't figure out why. For some reason, serializing aRawMap works fine, so we could do theRawMap->Map step back inmap_gui without needing extra dependencies. But bizarrely, deserializing breaks. The number of bytes passed back is the same, but the actual bytes themselves seem to change. Is it somehow an endianness or 32/64-bit issue, even though both ends are using wasm32?

  2. Reading the clipboard contents for the GeoJSON boundary isn't obvious. The WASM support for it requires some experimental flag, and it's async. I foundhttps://docs.rs/quad-wasmnastics/latest/quad_wasmnastics/ as possible reference.

Many other cleanups still needed, but first I just want to get this working

Zireael07 reacted with hooray emoji
... slightly stuck at the clipboard step
IT WORKS. getting overpass xml data back now!
... hitting the wasm env but though. I recognize you!
and try to load the received mapwe seem stuck after preparing the CH?
byte len matches, but then serde deserialize breaks.Invalid size 7310312400223103264: sizes must fit in a usize (0 to4294967295)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@dabreegster

[8]ページ先頭

©2009-2025 Movatter.jp