Bug 379297

Summary: Plain Map Theme appears blue
Product: [Applications] marble Reporter: Bernhard Beschow <shentey>
Component: generalAssignee: Dennis Nienhüser <nienhueser>
Status: RESOLVED FIXED    
Severity: normal CC: agangwar, clintonthegeek, nienhueser, wbauer1
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Bernhard Beschow 2017-04-27 21:43:07 UTC
Since commit f847505b02940aff9e37a6fa2317a7098c078d97 (Use tile zoom level consistently) the globe on the plain map theme looks blue only with continents labelled in red. No cities, borders or continents are shown.
Comment 1 Abhinav Gangwar 2017-05-08 05:25:41 UTC
It's because of change in GeometryLayer::render() method in commit f847505b02940aff9e37a6fa2317a7098c078d97, the zoom level is currently being calculated as:
`const int maxZoomLevel = qMin(d->m_tileLevel, d->m_styleBuilder->maximumZoomLevel()); `
This change causes the issue. Before the commit f847505b02940aff9e37a6fa2317a7098c078d97, it was being calculated as:
 ` const int maxZoomLevel = qMin<int>(qMax<int>(qLn(viewport->radius()*4/256)/qLn(2.0), 1), d->m_styleBuilder->maximumZoomLevel()); and worked fine. 

I don't understand the difference between those two ways of calculating the zoomLevel. So, need help with that.
Comment 2 Dennis Nienhüser 2017-06-26 19:17:09 UTC
*** Bug 381633 has been marked as a duplicate of this bug. ***
Comment 3 Dennis Nienhüser 2017-06-26 19:59:15 UTC
Git commit ce6cbb18b1483245ec2e43c84166f68cea60a26b by Dennis Nienhüser.
Committed on 26/06/2017 at 19:57.
Pushed by nienhueser into branch 'master'.

Fix both plain map and political map showing no content at all

Both have neither a texture nor a vector tile layer, and hence no
tile zoom level was set anymore in geometry layer after f847505. Now
a default tile zoom level is calculated in such scenarios.

M  +10   -7    src/lib/marble/MarbleMap.cpp
M  +6    -3    src/lib/marble/layers/VectorTileLayer.cpp

https://commits.kde.org/marble/ce6cbb18b1483245ec2e43c84166f68cea60a26b
Comment 4 Wolfgang Bauer 2017-07-04 12:35:49 UTC
(In reply to Dennis Nienhüser from comment #3)
> Git commit ce6cbb18b1483245ec2e43c84166f68cea60a26b by Dennis Nienhüser.

This commit does indeed fix the reported problem, but some countries are still "invisible" on the political map.
I'll file a new bug report about this.
Comment 5 Wolfgang Bauer 2017-07-04 12:42:05 UTC
(In reply to Wolfgang Bauer from comment #4)
> I'll file a new bug report about this.

See bug#381984 ...