dpi independent map/theme

Started by SwissPoPo, July 12, 2015, 12:26:47

0 Members and 1 Guest are viewing this topic.

john_percy

#15
I finally got round to testing this in an emulator. The three screenshots represent the same physical size screen at 120, 240 & 480 dpi respectively.
To cover the same area of land requires different zooms, and the appearance is not totally the same. Roads are wider in the higher dpi display, and more items will "appear" due to the higher zoom.
However, I can imagine that the higher detail of the the higher dpi might mean that one wouldn't need to zoom in so much in any case.


Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Menion

Hi guys, SwissPoPo pointed me on this topic. As I read it precisely since begin, I have still not idea what is problem. Mainly I don't understand how you may compare difference densities on same area. Devices with 160DPI has a lot smaller screens, so you see a smaller area. Anyway I still don't have big device. Tomorrow, I'll discuss this with Petr, who do themes for Locus. Maybe he will enlighten me and point on some solution.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

SwissPoPo

It is not easy explain the issue so that is understandable. It would be easier to take a look on such a device.

One more simple example:
You have two parallel streets.
=========== Name 1 ==========
=========== Name 2 ==========
On a 160dpi you see the streets and you can read the names.
On a high dpi device you make the streets wider (by theme), and double the text size (also by theme). ...now you have no problem. No! You can't read the second name, because the first name needs all space. The distance between the streets are always the same. They are NOT scaled (that is the issue).
  •  

Menion

hmm that sound logical. Oki. And solution for this?
- 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 March 13, 2016, 22:34:28
hmm that sound logical. Oki. And solution for this?

As mentioned above, that's the possibilities I see:

QuoteThere's two solutions:

- scale tile size with dpi (as mapsforge did starting with 0.4, 256px for 160dpi, 512px for 320dpi etc.), not implemented in Locus (and most other apps)

- use different zoom levels for comparison (e.g. one tile at ZL15 at 160dpi=256px is equal to four tiles at ZL16 at 320dpi=512px) and adapt you theme files accordingly, e.g. extra files for different dpi (disadvantage: zoom-min/max in theme files have also to be adjusted for real conversion, and zoom-appear in map files can't be adjusted)

With the second option I meant you have to use higher ZL at higher dpi devices, so e.g. if ZL15 is fine for you at 160dpi, someone has to use ZL16 for the same area at 320dpi, and someone else ZL17 at 640dpi.
developer of Elevate mapstyle for OpenAndroMaps
  •  

Menion

Ah thanks!

Fine, so it looks like best possible solution should be draw tiles based on some DPI scale. Hmm as Petr wrote, it's not most hot topic now and I also have on first sight no idea, how to do it, anyway we will try to focus on it probably during May when I hope I'll finally have some time to look on all these "MapsForge" stuff.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Lacerta

Oruxmaps has a different approaching to handle it.
It has a Mapsforge map setting option where the user can independently set the scaling of text, icon size and overall scaling.
I just guessing but likely does on the fly the same as scale= tags in the render xml.
Mabe a similar system could be also implemented in Locus.
  •  

john_percy

The disadvantage of the Locus method is that requiring different zoom levels for different dpi to see the same area alters the detail seen (because of fixed zoom appear). The Orux method avoid that and something similar could presumably be built in to the renderer by detecting dpi and magnifying accordingly. However high resolution devices would display a magnified version of low resolution devices maps.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •