-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Explore migration from tangram to MapLibre #3123
Comments
|
My first impression was that MapLibre isn't quite ready for use on Android— I wasn't able to find any docs besides this README, which still contains many links back to the mapbox docs. Based on the commit history it also seems like the Android version is not under particularly more active development than tangram (equivalent history). (That could be misleading, though, if most of the work is happening in code that's shared between platforms.) |
Reading the MapBox camera guide, it seems similar enough to tangram's api, and perhaps the center the camera within a map area feature could be used to fix #3101. So if these are still accurate, perhaps it will not be as much effort as I thought. |
I consider MapLibre / MapBox SDK somewhat more mature than tangram-es though. (Without having had a closer look though.): It is older, i.e. had some years headstart, and now for 3 years, tangram-es wasn't really much developed on. |
I'm reading through the MapBox docs now, and I agree it seems that way. Particularly interesting to me: it looks like dynamic display of quests may be possible without re-rendering the entire map. The main problem is that I'm not sure what features have changed since the MapLibre split; I didn't find any MapLibre documentation, and I don't see any way to reference the MapBox guides at the version before the split (the javadocs are versioned, so that's fine). edit: Here's a good overview: https://docs.mapbox.com/help/getting-started/add-markers/. Unfortunately,
The MapLibre fork happened just before version 9.3, so we might be limited to the latter. Even still, combined with data driven styling, I think we could easily enough do things like make the quest dots the same color as the background of the pin that will appear when they're expanded. |
They have a few different render & camera modes, which I think could replace our custom "compass mode" https://docs.mapbox.com/android/maps/guides/location-component/#rendermode (although with this approach, we give up some control / ability to tweak later) |
So the following steps need to be taken here: Phase 1
After the evaluation, if we decide it is worth it, there may be a phase 2 - to actually do the migration. |
generic mandatory features:
specific mandatory features:
nice to have:
What is missing in this listing? pinging @westnordost as it is relatively important pinging @smichel17 as help with finding missed issues is likely here |
Hmm, the following more, otherwise I think it is complete further mandatory:
nice to have:
|
@matkoniecz did not start working on it yet, so for the time being, this is free for the taking / can be done by other people interested in this. If you do, I can assign you to "reserve" this. |
Whoa, cool! Note that for some time, I have been playing with the thought whether it would not be less effort / more flexible / faster to skip vector map libraries and directly render the OSM data (etc.) onto the map like Vespucci or iD does. I.e. facilitate some (hardware accelerated) canvas-drawing of sorts. Advantages:
Not sure:
Disadvantages:
Anyway, these were my thoughts so far for the unicorny outlook of maybe rendering the map by oneself, using the That considered, I am of course very happy that someone looks into this, as tangram-es issues unfortunately have been piling up and piling up, to the point where I do not even bother to open bug reports in their repo anymore as it looks like it has finally been abandoned. Moving to the widely used MapLibre looks very much like the step in the right direction here. |
I wonder if we could borrow significant amounts of code from MapLibre/Tangram for this. |
If you have any updates or news, I'd be glad to hear about it! This is one remaining abandonware thorn in the sides of StreetComplete it would be very nice to get rid of (or explore how it can be done at least). If you have the code somewhere public, it can also help for future attempts even if you do not continue to look into it. |
Hey - I'm afraid to say I've been unable to prioritise this issue and give it the effort it needs (which is a lot). I've pushed up the changes I'd made here to 8f2d596 I've documented some of my thinking within the commit message. If anybody is interested in taking this over, I'd be happy to spend some time talking through the code and answering questions over a video call. My super summarised view is that I can't see any major reason not to migrate, other than the effort required in doing so 😄. Any time spent on this is time not spent on other changes, conversely the sooner this migration happens the less painful it will be. Bonne chance. |
I played a bit with the mapLibre work of @adrianclay, and added some more stuff: https://github.com/Helium314/SCEE/tree/maplibre As for the feature list generic mandatory features:
specific mandatory features:
nice to have:
not in the list, but relevant and not tested:
I think the next steps should be:
|
I'd definitely call it a prototype. Some parts are probably fine, while others are more experimental. |
I think I would work on it again, but can't really say whether I'll have the necessary time |
Cool! It would also be the most efficient way to go about this, because you already familiarized yourself somewhat with the framework. I'll consider this ticket reserved for now (there is enough other things that potential contributors could do). |
I started checking the current state again and worked on some stuff that was still missing. Anyway, I remembered the main issue with the current state: interaction with the map (sources and annotation managers) must be done on UI thread, and for testing I simply exposed the |
Hm well, any interaction with the UI has to be done on the UI thread in Android. So I guess, the answer is, to
|
FYI work in progress here: Helium314#516 |
I went through the list and took the liberty to add strikethrough for issues that will not be touched by migration to maplibre. |
I searched in the issue tracker for "maplibre" and further found the following issues: Could be revisited (that it can be solved with maplibre is not guaranteed) Resolved |
I searched for "tangram" and looked at issues down to # 3000. You missed some, I added them to your post. |
Thank you, I looked through the list and added them to the changelog here. The Caused by zoom limitation-stuff plus #179, #869, #1264 I did not add yet, because we did not implement quest clustering yet, which may or may not solve the issue of several quests at the same position but (ofc) only one being selectable. |
We are basically done with this now, see the todo list to the top of the PR. Final integration is blocked by two critical bugs in MapLibre and (maybe) by a to-be-reported issue - at least we'd need to work around that if it is not fixed. |
Anyone who would like to see this going forward and knows C++: MapLibre is always on the lookout for contributors. |
Originally posted by @westnordost in #1892 (comment)
Additionally, there's issues like #3101 which are complicated to fix due to working around tangram limitations.
From the parts I am familiar with, I think StreetComplete already has a decent wrapper around Tangram (e.g.
KtMapController
), so in many places it would "just" be a matter of swapping out the implementation of those interfaces, and then plugging any leaks in the abstraction. There's also the scene files; I don't yet know how they map to MapLibre features. And any other tangram features we use that I'm not familiar with.The text was updated successfully, but these errors were encountered: