MapsForge maps V4/V5

Started by Menion, January 03, 2019, 15:10:49

0 Members and 2 Guests are viewing this topic.

Menion

Hi to all at the start of the new year 2019,

more and more (advanced) users complain about little weird support of the latest version of MapsForge maps (V4+) in Locus Map app. So let's move with it?

I would like to ask for help here. First I need to better understand current problems with the support of latest MapsForge lib in Locus Map. From this, I would like to create a list of tasks that need to be done and set priorities. Please be short, be clear (or point me to already existing clear and short post).

I'm sure, that most of info was already wrote somewhere here, but to be true, I'm still confused about this topic. Thanks for understanding and help.

List of current known problems

  • fixed 256x256 tilesize, should scale based on DPI, more info - solved
  • hardcoded usage of themes V3 maps = V3 themes, V4+ maps = V4 themes - solved
  • multiple themes per directory - solved
  • missing auto-loading - solved, seems to be little slow when more maps is loaded, but works
  • problem with hillshading system, more info
  • incorrect redraw of text labels after zoom, more info
  • support for MapsForge POI
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  


Menion

Thanks John, appreciate it.

"Device screen scaling": I already read the post from Tobias, but I'm not too clever from this. What is the main issue he tries to describe except lack of interest in compatibility?

"Locus specials": is this something we may consider as a "problem"? I think we should stay with MapsForge V4+ support in 1:1 to original MapsForge library. If there will be any needs for improvements, I should cooperate with MapsForge developers and post my updates directly to MapsForge lib.
So post you mentioned, it is the nice and complete list of changes I made over years into V3 version, changes and improvements that will most probably miss in V4, but it is not a problem.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

freischneider

#3
For V3 maps, Locus displays all the themes.
Bild 1

Locus does not show all themes on V4 maps.
Bild 2
Poco F5, Android 13 / Xiaomi Redmi Note 10 Pro, Android 13
Locus Map 4 Gold (always latest version or Beta)
LM4 User-ID: 11cec7cb5  (Devices-ID poco F5)

Viajero Perdido

#4
Quote from: freischneider on January 03, 2019, 17:44:00Locus does not show all themes on V4 maps.

This is the big one for me.

I've collected every V3 external theme I can find, 29 of them!  With V4 maps, I only have 3.

I jump between themes a lot, trying to find the best-looking map (yes I'm shallow) for any given situation.

I was going to ask if there's a way to force V4 maps to show V3 themes (I can accept imperfect, and might resort to editing theme files directly), given that OAM will stop supplying V3 maps, but maybe you'll have a solution by then anyway.  Thanks for looking into this.

Oh, and text labels.  I wish cities wouldn't lose their names so often.  Sometimes I'm lost over the map; where am I?
  •  

Tobias

#5
Quote from: menion on January 03, 2019, 16:50:47
"Device screen scaling": I already read the post from Tobias, but I'm not too clever from this. What is the main issue he tries to describe except lack of interest in compatibility?
That post was more my tiredness of only limited support of new mapsforge features in various apps (not just Locus, but this was the app John came up with) which limit app-independent development as we do at OpenAndroMaps. In an older discussion I got the impression that LoMaps have a bigger priority than compatibility, but this new thread let's me hope for a change :-)

But as far as device screen scaling is concerned - as a cross-app-theme-developer this is the most important issue. It was introduced with mapsforge 0.4 in 2014, at first I was a bit sceptical but with very high ppi nowadays it's a must for good rendering, as far as I'm concerned.

Here's a description of the problem I posted in a different forum:
Quote
Mapsforge maps are meant to be scaled to screen density of the device, so that a map at 160ppi looks exactly the same as with 480ppi. To do that, not only symbols and line width are scaled, but also map tile size. So if you have a map tile size of 256px at 160ppi, you get 768px at 480ppi.
Locus uses a mod of a very old mapsforge version with no scaled tiles. So with modern devices with very high pixel density, you still get 256px like for devices years ago. The only thing that is scaled is line width and symbols. But as these grow larger (3x as large at 480ppi), the space on a 256px map tile gets more crowded, and less can be displayed. So when looking at the same zoom level, less and coarse information is shown.

Here are some comparison of a densely mapped are at zoom level 17:


At first, it looks as if Locus shows more - but this isn't the case, as the area is only larger as the tile sizes are smaller. The same area can achieved by OruxMaps by using the zoom button.

Now here you can see what details are available if tile size is adjusted:

In Locus, streets are rendered much too fat, so they overlap and swallow too much space. Only a few symbols are displayed, as most are eliminated because of too little space.

So the scaling policy of OruxMaps is true to how the maps are meant to be displayed and can be scaled to every pixel density without loss of details. The only disadvantage is that with larger tile size direct comparison to online maps with old 256px tile size is not possible (although there are more HD maps coming with larger tile size as it's necessary to keep the legible on high density devices).

On my to-do-list for the Locus version right now is the idea of moving all zoom-appears 1-2 levels as this is the only possibility right now to get it a bit better, but with other disadvantages.

Other issues:
- Folder structure for themes: only one theme xml per folder is allowed, and folder are also needed. Any other app with theme support allows xml files in base folder and graphics whereever the xml points to. So a special Locus format is always necessary. I get the one folder, one theme policy, but why not two or more xml files?
- Forced connection of V4 maps with V4 themes - it should be possible to use V3 maps with V4/V5 themes, or V3 maps and V3 standard mapsforge themes etc. Maybe use standard-mapsforge for all themes, whatever version, and locus-mapsforge-fork for those themes with locus-extended="1" in the rendertheme tag? That would solve the issues of the two posts above.

Best regards,
Tobias
developer of Elevate mapstyle for OpenAndroMaps
  •  
    The following users thanked this post: erfi

freischneider

Maybe this time you can solve this topic right away.
https://help.locusmap.eu/topic/save-maps-theme-specification-in-presets
We still have a few months left.  ;)
Poco F5, Android 13 / Xiaomi Redmi Note 10 Pro, Android 13
Locus Map 4 Gold (always latest version or Beta)
LM4 User-ID: 11cec7cb5  (Devices-ID poco F5)
  •  

Menion

@Tobias
excellent description I needed, thanks :).

About themes: Currently, all V3 maps use Locus-MapsForge rendering system, V4+ maps use than MapsForge 0.10.0. So what I may do: allow all V3 and higher themes for V4+ maps oki? I'll look at it.

@freischneider
the mentioned topic is more feature request than some issue in V4 support. Sorry, this does not belong here and sorry second time: this will have to wait a little more.

---

Oki, so first post updated and list sorted by priorities as I feel it. Seems all should be doable. The major problem will be auto-loading system, but ... maybe not so big.

As I wrote on few places, currently I work on some bigger changes in how app work with maps, so expect during February some highly unstable version for testing, hopefully with some changes from this list :).
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download

Tobias

Quote from: menion on January 03, 2019, 21:52:13
@Tobias
excellent description I needed, thanks :).

About themes: Currently, all V3 maps use Locus-MapsForge rendering system, V4+ maps use than MapsForge 0.10.0. So what I may do: allow all V3 and higher themes for V4+ maps oki? I'll look at it.
Allowing all V3 themes might make problems with V4+ maps when locus extended tags are used. V3 maps on the other hand won't make problems with mapsforge 0.10. So checking for locus-extended might make sense.

Another issue: on tile borders labels and symbols aren't rendered reliably. Using larger tiles with device depedent scaling helps a bit, but the only solution which completely solves this that I know of is the label layer of mapsforge. But I think the mapsforge maps viewer is necessary for this. More here: https://github.com/mapsforge/mapsforge/blob/master/docs/LabelLayer.md
developer of Elevate mapstyle for OpenAndroMaps
  •  

Menion

I'll think about themes, thanks for feedback.

About labelLayer, I'm aware of it. using Mapsforge MapView component directly is impossible and unwanted task, anyway I'm watching this topic https://github.com/mapsforge/mapsforge/issues/1085 . Result is class that might help here and that will be available in 0.11 ... so we will see.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

vagabond235

Just found this thread as I was investigating why automatic map switching does not work any more with some maps I recently updated from openandromaps.
So - definitely voting for the implementation of automatic map switching.

My "typical" scenario is investigating maps of potential holiday destinations - zoom out from current position to a world map - shift the map - zoom in for details. The old way was very convenient to achieve this.
I know you invested a lot in v3 optimization - but my guess is it cannot stay forever :)
cheers
Flo
  •  

Menion

Cannot? Maybe it can :).

Anyway, you may track progress in the first post. I believe that core features are now implemented.
I still suffer by some technical problems in my "new map core", anyway I believe, that during next week will be some first Alpha version ready for the first test.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •