-
Notifications
You must be signed in to change notification settings - Fork 68
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
[New Platform] Compile Mobile SDK to the Web/Javascript via Emscripten #510
Comments
@bugra9 amazing! I tried your demo site on my mobile phone and I got a blank page. I ll try tomorrow on my computer |
@farfromrefug, I deployed very fast and didn't optimize for size. If your internet is slow, you may have to wait a little longer. What is your browser name? I tested it on Firefox Android and Chrome Android and it worked. |
I waites quite a lot and still white page. I see the debug button but then nothing in the console. |
@bugra9 Very impressive! I did a basic Emscripten port of mobile-carto-libs 2-3 years ago just for testing but making full SDK port seemed way too much work :-). I will take a closer look at the code later this week and will add detailed questions/comments. But at the high level it looks very good. I did a quick test on different devices:
|
Thank you. It was quite difficult for me, but the result was worth the effort. I learned a lot. SharedArrayBuffer is required for thread support. For security reasons, it is necessary to add two headers to the response. I added "Cross-Origin-Opener-Policy: same-origin" and "Cross-Origin-Embedder-Policy: require-corp" but I don't understand why Apple doesn't allow access to SharedArrayBuffer. I will investigate this. |
Hi @mtehver, I ported this excellent project to the web. My motivation,
This implementation covers multiple projects so I'm writing to this issue instead of a pull request. Related projects;
Demo: https://mobile-sdk-web.netlify.app/
Example Usage: https://github.com/bugra9/mobile-sdk/blob/emscripten-support/scripts/emscripten-dev/main.js
In the demo application, the debug icon appears after 7 seconds. You can test live with it.
Tested;
Known Issues;
NMLModel looks transparent.onMapClicked and onVectorTileClicked don't work. (Emscripten bug. Event is thrown to the listener only in the main thread.)The text was updated successfully, but these errors were encountered: