Display Scale / Font Size / userScale

124 views
Skip to first unread message

Zsolt Ero

unread,
Mar 10, 2018, 11:07:41 PM3/10/18
to mapsforge-dev
I'm creating a map theme based on VTM default to an Android app which is using the latest VTM.

I'm quite confused about how the map looks on different devices.

In Cruiser GL on Desktop, Display Scale changes which zoom level is selected for a given region.
In Cruiser for Android, it seems that only Font Size is offered, and it actually just sets font size, not the zoom factor.
Which one is userScale?

How is display on Android calculated and what is the recommended way to get the best results?

I've posted screenshots with details in this GitLab issue, if you'd like to see the difference Display Scale makes.
https://gitlab.com/xcontest-public/xctrack-public/issues/160
Message has been deleted

Emux

unread,
Mar 11, 2018, 10:05:38 AM3/11/18
to mapsfo...@googlegroups.com
Mobile devices have many different screen sizes and densities, so vector maps need specific scale adjustments to be readable in each one.

VTM uses an auto-calculated tile size to render the vector map elements in high density devices, for improved readability.

That's the basis.

- Additionally can influence specifically the labels text size with CanvasAdapter.textScale (default 1).

- And can influence the tile size and all map rendering with CanvasAdapter.userScale (default 1).

- Or can disable automatic tile size with Parameters.CUSTOM_TILE_SIZE in order to set a custom tile size.

In most cases it's recommended to use the pre-calculated tile size which is based on device dpi.
And usually don't need to play with userScale too.
But any tile size change needs to be done at map view initialization and not while GL rendering.


Don't be confused with desktop and zoom levels certainly don't change.
At each zoom level the exact same data is available and rendered.
Larger tile size allows more space for elements to fit in and appear larger (polygons, symbols, labels).
So in high density devices the map can be again readable.


Cruiser GL on Desktop uses 512px tile size.

--
Emux
Reply all
Reply to author
Forward
0 new messages