summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-03-14 09:23:38 +0100
committerAlex Blasche <alexander.blasche@digia.com>2014-03-24 08:33:53 +0100
commit4ead4a65f4d1e45e60eeeb22e58cf44f42489b65 (patch)
tree092dc28db4df120a05bc390705be314536ef58b9
parent09da098eea70698faab38c225e2d96e4f9ee38c3 (diff)
Fix broken QGeoTiledMapData::fitInViewPort()
the zoomfactor was wrong is the minimumZoomLevel is not 0 Task-number: QTBUG-37502 Change-Id: Icc8b561cf1d11c63532c6c8559809e7b00d1ef95 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--src/location/maps/tiled/qgeotiledmapdata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/location/maps/tiled/qgeotiledmapdata.cpp b/src/location/maps/tiled/qgeotiledmapdata.cpp
index cc40c0671b..bd7f952f9a 100644
--- a/src/location/maps/tiled/qgeotiledmapdata.cpp
+++ b/src/location/maps/tiled/qgeotiledmapdata.cpp
@@ -591,7 +591,7 @@ void QGeoTiledMapData::fitInViewport(const QGeoBoundingBox &bounds, bool preserv
int minZoomLevel = engine()->minimumZoomLevel();
int maxZoomLevel = engine()->maximumZoomLevel();
- int zoomFactor = 1 << maxZoomLevel;
+ int zoomFactor = 1 << (maxZoomLevel - minZoomLevel);
for (int i = minZoomLevel; i <= maxZoomLevel; ++i) {
QRect rect = d->screenRectForZoomFactor(zoomFactor);