Bug (?) with zoom level of MapsForge maps

Started by LaurentG, October 11, 2018, 10:07:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LaurentG

Hi,

it looks like a bug with zoom level of MapsForge (vector) maps.



When we switch from a raster map (in mbtiles or OruxMaps format) to a Mapsforge map (or vice versa), we stay at the same "official" (displayed) zoom level .... but the real one do change, and the displayed area as well  :oops:

You can see below that the coverage at zoom 15 of a raster map (OSM) do not correspond to the coverage of zoom 15 of MapsForge map, but to coverage at zoom 14 !



The most "strange" is that if we create a multimap based on the MapsForge map, adding for example the hiking paths of WayMarkedTrail (that are raster map).... "displayed" zoom level becomes OK



Is this a known bug.... or is there somewhere some option (I've not been able to find...) to fix the issue ?

(I am with latest (7.3.7) version of OruxMaps, and latest version of France_South mapsforge map.)



Thanks in advance !



OSM (raster) map at level 15

https://images2.imgbox.com/db/e9/fkreV8cY_o.png">



MapsForge (vector) map at level "displayed as" 15

https://images2.imgbox.com/88/8d/V0ualQ7o_o.png">



At level 14, same coverage than raster map at level 15

https://images2.imgbox.com/a6/6c/pKGuBuhw_o.png">



Multimap mixing Mapsforge and raster WMT displays level 15 for the same coverage

https://images2.imgbox.com/d3/e7/tcZEIvki_o.png">

eartrumpet

#1
This is mainly a misunderstanding what zoom level means. It doesn't mean map scale, that's what the bar with the meter value above is about. Zoom level in digital maps means just that the current map at this level has 4^n tiles, see also here: https://wiki.openstreetmap.org/wiki/Zoom_levels">https://wiki.openstreetmap.org/wiki/Zoom_levels



If the map scale is different at the same zoom level, it is because of different tile sizes. Raster maps, usually for online usage and meant for computer display pixel density, have 256x256px tile sizes. But smartphone pixel densities are much higher nowadays, 256px was sufficient for 160ppi, now we usually have 480ppi or more. So 256px raster maps are very hard to read on these displays and are therefore usually digitally zoomed. There are now online raster maps fore higher densities, often called "retina" with 512px etc.



With vector maps, tile size is flexible. So if you have a high density device, the tile size is adjusted to the density so the content of a tile is exactly the same as with a 160ppi device, e.g. with 480ppi you get 768px tiles. That makes maps and themes much more usable on any device and lots of difficulties are avoided.



So maybe OruxMaps should offer some option like "switch to similar map scale when changing maps" instead of switch to similar zoom level as it is now. But technically this is no bug.



With multimaps, all maps have to use the same tile size - so the maps which have flexible tile size (here: vector maps) are adjusted to the maps with a fixed tile size. In your case it's probably 256px, I have mbtiles maps with 512px and a similar, but not as drastic phenomena. Here also an option like "combine similar map scales" instead of zoom levels would be helpful.



More information on these topics are also in this threads:

https://www.oruxmaps.com/foro/viewtopic.php?f=8&t=4602">https://www.oruxmaps.com/foro/viewtopic.php?f=8&t=4602

https://www.oruxmaps.com/foro/viewtopic.php?f=3&t=4345">https://www.oruxmaps.com/foro/viewtopic.php?f=3&t=4345

LaurentG

#2
Thank you for explanation.... but there is still something I do not understand.



Raster maps in mbtiles format have tiles 256x256

But same map in OruxMaps OTRK format (either sqlite or "tile storage") have tiles 512x512



Then, as far as I have understood your explanations, we should have different behaviour when switching from a 25x256 raster to MapsForge and from a 512x512 raster to Mapsforge.

And even have similar issue when switching from 256x256 to512x512 raster...

While behaviour is exactly the same whatever raster format, and no issue when switching between two rasters of different formats...



If you have a complementary explanation, it could help me to better understand.



Nowadays, you're right, add an option like "switch to similar map scale when changing maps" would be great. And then I crate a topic under "MEJORAS/NEW FEATURES" to keep record of it.

eartrumpet

#3
Quote from: LaurentG post_id=14393 time=1539500579 user_id=7848
While behaviour is exactly the same whatever raster format, and no issue when switching between two rasters of different formats...

That's probably because the tile size is fixed - one time 256px, one time 512px, so switching my mapscale is the same on every device, so OruxMaps provides this already (although with a wrong zoom level displayed shown when using 512px).

It used to be the same with mapsforge maps when OruxMaps had used a fixed tile size of 512px, but this had some display bugs, also wrong zoom level (which is akward when someone wanted to change a theme etc.) and also the advantage of flexible tile size and "one theme fits all" was lost that way.