Modified correct name to ZOOM const.
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Tue, 13 Apr 2010 13:16:41 +0000 (16:16 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Tue, 13 Apr 2010 13:16:41 +0000 (16:16 +0300)
src/map/mapengine.cpp

index 5a9400a..938ddc4 100644 (file)
@@ -110,12 +110,7 @@ void MapEngine::mapImageReceived(const QUrl &url, const QPixmap &pixmap)
 
         mapTilesInScene.insert(url.toString(), mapTile);
         m_mapScene->addMapTile(mapTile);
-
-        //qDebug() << "Map scene tile count: " << m_mapScene->items().count();
-        //qDebug() << "Map hash tile count: " << mapTilesInScene.size();
     }
-
-    //removeTiles(viewGrid);
 }
 
 QGraphicsScene* MapEngine::scene()
@@ -148,7 +143,7 @@ void MapEngine::setLocation(QPointF sceneCoordinate)
 
     if (centerTileChanged(sceneCoordinate)) {
         calculateTileGrid(sceneCoordinate);
-        removeTilesOutOfBounds();
+        //removeTilesOutOfBounds();
     }
 }
 
@@ -165,7 +160,7 @@ void MapEngine::calculateTileGrid(QPointF sceneCoordinate)
 {
     //qDebug() << __PRETTY_FUNCTION__;
 
-    viewGrid = calculateGrid(m_sceneCoordinate);
+    viewGrid = calculateGrid(sceneCoordinate);
 
     int topLeftX = viewGrid.topLeft().x();
     int topLeftY = viewGrid.topLeft().y();
@@ -204,7 +199,7 @@ void MapEngine::removeTilesOutOfBounds()
 {
     //qDebug() << __PRETTY_FUNCTION__;
 
-    int zoomFactor = 1 << (MAX_ZOOM_LEVEL - m_zoomLevel);
+    int zoomFactor = 1 << (MAX_MAP_ZOOM_LEVEL - m_zoomLevel);
 
     QPointF topLeft = convertTileNumberToSceneCoordinate(m_zoomLevel, viewGrid.topLeft());
     QPointF bottomRight = convertTileNumberToSceneCoordinate(m_zoomLevel, viewGrid.bottomRight() + QPoint(1, 1));