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()
if (centerTileChanged(sceneCoordinate)) {
calculateTileGrid(sceneCoordinate);
- removeTilesOutOfBounds();
+ //removeTilesOutOfBounds();
}
}
{
//qDebug() << __PRETTY_FUNCTION__;
- viewGrid = calculateGrid(m_sceneCoordinate);
+ viewGrid = calculateGrid(sceneCoordinate);
int topLeftX = viewGrid.topLeft().x();
int topLeftY = viewGrid.topLeft().y();
{
//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));