Summary: | Support for different/high DPI devices | ||
---|---|---|---|
Product: | [Applications] marble | Reporter: | Marcos Dione <mdione> |
Component: | general | Assignee: | marble-bugs |
Status: | CONFIRMED --- | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Marcos Dione
2012-07-08 12:20:07 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. 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 |