Bug 303187 - Support for different/high DPI devices
Summary: Support for different/high DPI devices
Status: CONFIRMED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR wishlist
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-08 12:20 UTC by Marcos Dione
Modified: 2019-08-18 09:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos Dione 2012-07-08 12:20:07 UTC
On high DPI devices, like the Nokia N900, the texts in tiles from tile based maps, like OSM, are rendered very sharply but very tiny. This make the use of the program as a in-car navigation system. These same concerns were cited, but with printing in mind, in this thread (thanks tackat):

http://mail.kde.org/pipermail/marble-devel/2012-March/002921.html

Reproducible: Always
Comment 1 Marcos Dione 2012-07-08 12:42:08 UTC
several guys from the IRC channel came up with the following hack:

--- 8< ---
diff --git a/src/lib/layers/TextureLayer.cpp b/src/lib/layers/TextureLayer.cpp
index 5712945..ea165dc 100644
--- a/src/lib/layers/TextureLayer.cpp
+++ b/src/lib/layers/TextureLayer.cpp
@@ -214,7 +214,7 @@ bool TextureLayer::render( GeoPainter *painter, ViewportParams *viewport,
     // As our tile resolution doubles with each level we calculate
     // the tile level from tilesize and the globe radius via log(2)
 
-    qreal tileLevelF = qLn( linearLevel ) / qLn( 2.0 );
+    qreal tileLevelF = qLn( linearLevel ) / qLn( 2.0 ) - 1;
     int tileLevel = (int)( tileLevelF * 1.00001 ); // snap to the sharper tile level a tiny bit earlier
                                                    // to work around rounding errors when the radius
                                                    // roughly equals the global texture width
--- >8 ---

Which works nice in my N900 (even when it's actually marble 1.3) and might give an idea on how to implement it.
Comment 2 Marcos Dione 2019-08-18 09:10:15 UTC
BTW, what some map renderers are doing is create 512x512 tiles instead. See for instance https://miro.medium.com/max/816/0*5T9IrSwyJPpSC--m.jpg
Comment 3 Marcos Dione 2019-08-18 09:10:59 UTC
I meant this link https://blog.mapbox.com/retina-maps-added-to-the-mapbox-ios-sdk-c0cb91245bf3