Scale online tiles on high-res devices

65 views
Skip to first unread message

jdou...@gmail.com

unread,
Sep 6, 2017, 2:21:47 PM9/6/17
to mapsforge-dev
Here is a Stack Overflow question that explains the problem:


Using the online tiles on high-res devices make the map appear very small and the texts are unreadable.
Is there a way to zoom the bitmaps to display all bigger? And if not, will this feature be coming?




Emux

unread,
Sep 6, 2017, 2:31:45 PM9/6/17
to mapsfo...@googlegroups.com
Map view tile size is what defines the rendering, both in vector and raster maps.

We have examples with raster tile sources in Mapsforge samples app, e.g. DownloadLayerViewer.

There a fixed tile size 256px is used, as that is provided by the tile source (see here):

this.mapView.getModel().displayModel.setFixedTileSize(256);

If you remove that line, then the map view tile size will be auto-calculated based on device dpi (like in vector maps) and so the raster tiles would appear bigger (though a bit blurry).

--
Emux

jdou...@gmail.com

unread,
Sep 6, 2017, 2:40:31 PM9/6/17
to mapsforge-dev
That works. Awesome. If you are a member of Stack Overflow I encourage you posting this as an answer.
Reply all
Reply to author
Forward
0 new messages