World base map overlay to fix slow mapsforge rendering on lower zooms

joeloc shared this question 1 year ago
Answered

Problem with vector maps, as we all know, is that they render horribly slow on lower zooms. Zooming out a bit, moving to a new place and zooming back in is really not a nice experience in Locus.


I recently had the idea to "fix" this by using an offline sqlite world map (eg zooms 0 to 8) as "overlay" for vector maps. Because the overlay renders independently from the vector map, it would appear "immediately" when zooming out.


However, I cannot seem to find the correct "blend mode" setting for this. What I want:


Render the overlay at 100% (first).

Render each vector map tile at 100% on top of the overlay tile. Basically, the vector map tiles replace the overlay tiles when finished.

Do NOT render the white "Loading..." text on top of the overlay map.


Is this possible with current Locus? I think together with auto-loading of vector maps, it might lead to a very smooth "zoom out/pan/zoom in" experience.

Comments (13)

photo
1

Dear joeloc,

Well that's really warning for us because you have to be really desperate if you try to find such workaround. However have you tried the world vector map that is available in Locus Store. I guess that for zoom-levels 0-8 works well.

Honestly I'm not sure if any blend mode can solve it. Have you tried them? I guess that loading dialog will be always visible. no matter which blend mode you use.


Best regards

Petr

photo
1

Vector maps can never be as pretty as "painted" maps... nor as fast. Well... maybe not for the next ten years at least :-). They are of course much superior at high resolutions. Type of map isn't really the point though... it's more about auto-switching to overview maps and back. I think current Locus cannot do that properly, or am I missing something?

Like:

I am at zoom 15 on Germany.map.

I zoom out to zoom 12.

Locus must switch seamlessly to Worldmap.sqlite.

I scroll to Spain.

I zoom back in to 14.

Locus must switch seamlessly to Spain.map

etc.

This feature has been asked for many years I believe. I thought I could maybe "simulate" such a behavior a little bit with overlay maps. No luck though... the blending options aren't enough. It would require something like

"SRC_IN 100% if zoom < X"

"DST_IN 100% if zoom >=X"

I could maybe fake it by supplying a World.sqlite with 100% transparent empty tiles at max zoomlevel X... but how to create that?

photo
1

Your proposal about switching Germany > World > Spain make sense and we have some ideas how improve current behavior. I hope that we're able to offer better experience in next months (if menion decide to change it :)

To your second part... well I can imagine that could be possible to create empty world vector map and set is as transparent or create script that insert empty transparent images into sqlitedb but I don't like it :)

photo
1

Mobac can do it apparently. I just created a sqlite map with


zoom 0-11: pretty europe overview map

zoom 12: hillshading tiles


When using that in Locus as overlay at 100% on top of vector maps, it behaves pretty well:

At zooms 12-18, I see a hillshaded vector map.

At zooms 0-11, I see the pretty worldmap and not a single pixel of the ugly vector map.


Together with auto map switch for vector maps, it would even change from Spain to the Alps and back. The overlay always stays in place for small zooms.


Obviously, Locus still wastes time in rendering the vector map at lower zooms. But nothing of it will be visible.

photo
1

I see and what is the size of such map?


And I still believe that simple world vector map is the good solution we should focus on...

photo
1

Sure... for something being shipped with Locus or downloaded from Locus servers, a worldmap at zoom 12 in bitmap tiles is not very practical, no matter how much you compress it.


But this is Android after all, so memory is practically free... unless you buy one of those crippled google rubbish phones. Even Samsung re-introduced the sd-card slot after one misguided attempt of "applicfication" on the S6. There will always be heavy users who will easily spend 4GB or more for a "smooth and pretty" Locus experience.

photo
photo
1

Locus once supported "splitted" sqlite maps with one file per zoom level or some such. Is this still possible? Is this documented properly somewhere? I only find fractions of possibly outdated information on the forum and nothing useful at all in the "knowlegde base".

photo
1

I had to ask menion if we used to use similar maps or format but honestly we don't know anything about such format :). What is possible that Locus "joins" several sqlitedb maps in folder into one map but this probably something else..

photo
1

Thats what I was talking about. How exactly does this work? Any naming conventions for the map parts? One file per zoom level? Or does it not matter? Where can I find some documentation on this?

photo
1

Simply put several sqlitedb maps into the same folder and Locus combine files into one map - short paragraph about it is mentioned in http://docs.locusmap.eu/doku.php?id=manual:user_guide:maps_external

When you browse the map, Locus checks all files in folder and tests if exist any tile for current position and zoom level. Honestly I don't know what happen if more then one tile exist for location. Probably the first one win. It's more on menion.

photo
photo
1

aca43af569a67a58274f3247ad04ff6f

Overview map comparison: Kompass vs Falk vs LocusWorldOSM.sqlite at zoom 8.

photo
1

Just saying... when you implement some sort of "overview map" with automatic switching in Locus, please do it in a way that we can use our own overview maps. Don't limit it to some specific Locus-rendered vector map. There are many prettier and more useful things out there than what the mapsforge engine will be able to accomplish.

photo
photo
1

707ff5f08a379536ad4a9aaa91a8cf4a


Geoportail overview map at zoom 12 vs vector bullshit at zoom 12.


Seriously... folks... you MUST realize that using vector maps for overview is MISGUIDED. Everybody who works in GIS knows that lower zooms require handcrafted maps. Please give us a choice to auto-switch to any map at any zoom level. Your planned default vector world map will not suffice.