-
-
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
Replace Tangram with Maplibre #5693
Conversation
…lt interpreted as rad
- the single components own the sources now - make sure that all of this UI stuff is called on the UI thread
Is MapLibre still trying to download more glyphs when offline? (It should appear in the log) |
I was unable to reproduce it until I noticed the problem was actually switching to the places overlay, which also seems to require glyphs that are not pre-downloaded. Is there a way to make sure that overlay texts only use glyphs that are already downloaded together with tiles? Or maybe MapLibre should use some fallback instead of (whatever causes this bug)? |
Hmm... perhaps it is possible to have all the font glyphs locally already. As long as one doesn't go wild with different fonts and font weights, it is not that much in terms of file size. Not sure how to refer to them in the style JSON though. They can be downloaded here: https://github.com/kylebarron/openmaptiles-fonts/tree/master/fonts (Otherwise, ) does MapLibre download them as files into the app cache directory, or again into some database? If the former, it should be possible to download them all beforehand manually (like we did with tangram tiles). Edit: Could try with |
This works nicely, I wasn't able to reproduce the bug so far when having glyphs in assets! One more issue I noticed: Sometimes switching between overlays takes a second or so. When I select an element of the old overlay before the new map features are set, I can e.g. set the address of a waste bin. It should be better for most users due to faster phone and non-debug version, but still should not happen. |
Hm! 🎉? Is this the workaround we have been looking for all this time? (Is it possible to also specify the streetcomplete.json itself to sit in the assets folder? Currently for offline download, we have to have this remote duplicate of the streetcomplete.json) Regarding the issue: Well, sounds like that would make sense. (The first, if it doesn't work, the second) |
Really looks like it is. So I'll put the fonts to assets.
|
But then I have to change the remove streetcomplete.json, too. I hope that works with the offline downloader |
I vaguely remember the remote json only needs the same tile URL as the local one to work properly. |
overlays may take a while to load, and when the old overlay is not cleared the user can select features of the old overlay, but in context of the new overlay (e.g. switching from things to address would allow editing the address of a waste bin)
Btw the glyph folder names are a little weird, e.g. |
Yeah, or just one font, so that we don't need to keep around font fallbacks. After all, we do keep the fonts ourselves, no need for fallbacks. |
use only roboto regular and bold add slight text offset to clusters to avoid font appearing off-center
So I guess it's time for a little more testing now, and then... I'm not sure that maplibre/maplibre-native#2206 will eventually get fixed. Maybe we should merge this regardless? |
@@ -184,6 +184,7 @@ class StyleableOverlayMapComponent( | |||
.withProperties( | |||
iconImage(get("icon")), | |||
textField(get("label")), | |||
textFont(arrayOf("Roboto Regular")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You had to write this because MapLibre uses some font by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the default is Open Sans Regular
and Arial Unicode MS Regular
Yes, let's do it. |
And I'll document our findings in the respective tickets. |
I did a "live test" and noticed a few minor visual glitches. Will open issues, or do PRs/commits depending on fixes I find. (but first I'll probably spend 2 days or so on merging this into SCEE) |
One thing that just came to my mind with all this offline region gehampel, are we maybe massively producing overlapping offline regions by just downloading and hence producing massive amounts of (unused / doubly used) cached map tiles? E.g. just when opening the app, the app will already download two regions (small rectangle around the user, then big rectangle around the user). Since offline regions seemed to have never been thought through completely (maplibre/maplibre-native#2724), maybe there are issues with overlapping and managing (many) offline regions, too. |
As far as I remember from looking through the offline database, tiles are downloaded only once. Tiles and regions are linked in some db table, and a single tile may belong to more than one offline region. Thus I think overlapping offline regions are not an issue. The small-rectangle region will be useless in the db, but only occupy very little space (download url, some dates, which tiles belong to this region). |
Phew! Thank you for checking! |
Thank you to the developers for all of your efforts on making this available on iOS! StreetComplete is an invaluable tool and we will all benefit from more people able to map with it. |
by @Helium314 and me.
This PR is the same as Helium314#516 only that it merges to vanilla StreetComplete.
Visible differences to Tangram-ES
Blocked by
Missing data for single tiles when usingsuccessfully worked-aroundGeoJsonSource
maplibre/maplibre-native#2410Known bugs
MapProjection::pixelForLatLng
returns wrong values when camera has tilt maplibre/maplibre-native#2255Crash on Android while in background maplibre/maplibre-native#2432
Awkward animation of dashes at certain zoom levels maplibre/maplibre-native#2433
Remarks
CustomGeometrySourceOptions.withClip
always enabled? maplibre/maplibre-native#2262 is fixed