QRect MapEngine::calculateGrid(QPointF sceneCoordinate)
{
-
QPoint tileCenterCoordinate = convertSceneCoordinateToTileNumber(m_zoomLevel, sceneCoordinate);
- qDebug() << tileCenterCoordinate.x() - (GRID_WIDTH/2);
int topLeftX = tileCenterCoordinate.x() - (GRID_WIDTH/2);
int topLeftY = tileCenterCoordinate.y() - (GRID_HEIGHT/2);
QUrl url = buildURL(m_zoomLevel, QPoint(tileX, tileY));
- qDebug() << url.toString();
-
if (!mapTilesInScene.contains(url.toString())) {
emit fetchImage(buildURL(m_zoomLevel, QPoint(tileX, tileY)));
}