Replies: 2 comments
-
Oh wow, is this a reimplementation of a map renderer on the Skia canvas instead of using MapLibre Native? That's really impressive!
Well, I've thought about building something similar instead of pursuing #218, but decided not to, because while both are gargantuan efforts, I felt graphics rendering is so far outside my skillset that I'd definitely burn out if I went at it alone 😅. (by the way, @westnordost, we even talked about such a project last month) Thinking about it some more, I think such a project would never fully replace a MapLibre Native / GL JS wrapper though, because Skia is a 2D graphics library, and MapLibre has some 3D features:
But on the other hand, a MapLibre Native/JS wrapper will never fully work properly with Compose, because of issues like this:
So yeah, I'd say it's worth pursuing a Skia renderer, if you have the motivation to pursue it. Apps that only need the 2D features would probably be more robust with the Skia renderer if it's completed.
I think collaboration is possible. A Compose Multiplatform implementation for MapLibre really solves two high level problems:
It'd be great if we solve the top half, the Kotlin and Compose idiomatic map styling API, just once instead of twice. With maplibre-compose, these two problem layers are somewhat coupled together in implementation, but it doesn't need to be that way. I've already thought about needing some decoupling so the "rendering engine" can be swapped out depending on the needs of the app. For example:
So, I've been thinking about some sort of API where there's an interface for the "engine" of the map, and it's interchangeable with different implementations available on various platforms. If you've used Ktor, you might be familiar with how you initialize an HTTP client with So, what does that mean for collaboration? Well if on our side we work on decoupling the API from the rendering engine, and on your side the focus is on just getting map functionality implemented with a barebones API without worrying too much about API ergonomics or interactivity, then in the end we could have a full implementation with a single API across MapLibre Native, JS, and Skia. If all that sounds reasonable to you, then we should probably talk about where the API boundaries should be: what's a responsibility of the "engine" vs of the API? For example, I'd propose that camera state and gestures should be hoisted up to the API, but tile management kept inside the engine. And in the short term, well we already have one sufficiently decoupled module: |
Beta Was this translation helpful? Give feedback.
-
And by the way, if you're not there already, you should join the #maplibre-compose channel on the OSMUS Slack |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
To get MapLibre running on Compose Desktop & WASM, we started a clean implementation using Compose Multiplatform. After making some progress, we’ve realized that—even with MapLibre’s excellent documentation—a full clean implementation is a pretty massive task that takes a lot of time and effort. Right now, we have a working prototype (I’ve hidden it under a spoiler). Also debug app
I’m writing here to ask for your thoughts on the future of this effort 😊 Is there any way to organize some collaboration, so we could join forces and achieve a full implementation together? Or do you think it’s not worth pursuing? Any opinions or advice would be greatly appreciated! 🙏
Screenshots(StreetV2 style)
Screenshots(Other styles)
Symbols Layout
The result is shown(BIG GIF) in the screenshot below.
Screenshots(collision detection debug)
Beta Was this translation helpful? Give feedback.
All reactions