Author Topic: dpi independent map/theme  (Read 5041 times)

Offline john_percy

  • Padavan of Locus
  • ***
  • Posts: 384
  • Thanked: 17 times
    • View Profile
  • Device: MotoG
Re: dpi independent map/theme
« Reply #15 on: September 04, 2015, 19:06:10 »
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.


« Last Edit: September 04, 2015, 19:08:23 by john_percy »
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10003
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: dpi independent map/theme
« Reply #16 on: March 13, 2016, 21:29:45 »
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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline SwissPoPo

  • More than Newbie
  • *
  • Posts: 17
    • View Profile
Re: dpi independent map/theme
« Reply #17 on: March 13, 2016, 21:42:23 »
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).
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10003
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: dpi independent map/theme
« Reply #18 on: March 13, 2016, 22:34:28 »
hmm that sound logical. Oki. And solution for this?
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Tobias

  • More than Newbie
  • *
  • Posts: 72
  • Thanked: 2 times
    • View Profile
    • Elevate themes
Re: dpi independent map/theme
« Reply #19 on: March 13, 2016, 22:42:15 »
hmm that sound logical. Oki. And solution for this?

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

Quote
There'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.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10003
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: dpi independent map/theme
« Reply #20 on: March 14, 2016, 12:10:41 »
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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Lacerta

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • Device: Sony Xperia Z
Re: dpi independent map/theme
« Reply #21 on: May 20, 2016, 09:39:43 »
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.
 

Offline john_percy

  • Padavan of Locus
  • ***
  • Posts: 384
  • Thanked: 17 times
    • View Profile
  • Device: MotoG
Re: dpi independent map/theme
« Reply #22 on: May 21, 2016, 11:24:40 »
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.