mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-19 04:02:09 +01:00
Fixed broken TMS maps rendering
This commit is contained in:
parent
77e9fae19d
commit
5fcc27c176
@ -208,8 +208,9 @@ void OnlineMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
|||||||
|
|
||||||
QPixmap pm;
|
QPixmap pm;
|
||||||
if (QPixmapCache::find(key, &pm)) {
|
if (QPixmapCache::find(key, &pm)) {
|
||||||
QPointF tp(tl.x() + (t.xy().x() - tile.x()) * tileSize() * f,
|
QPoint tc(tileCoordinates(t.xy().x(), t.xy().y(), base));
|
||||||
tl.y() + (t.xy().y() - tile.y()) * tileSize() * f);
|
QPointF tp(tl.x() + (tc.x() - tile.x()) * tileSize() * f,
|
||||||
|
tl.y() + (tc.y() - tile.y()) * tileSize() * f);
|
||||||
drawTile(painter, pm, tp);
|
drawTile(painter, pm, tp);
|
||||||
} else
|
} else
|
||||||
renderTiles.append(OnlineMapTile(t.xy(), t.file(), _zoom, overzoom,
|
renderTiles.append(OnlineMapTile(t.xy(), t.file(), _zoom, overzoom,
|
||||||
@ -230,8 +231,9 @@ void OnlineMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
|||||||
|
|
||||||
QPixmapCache::insert(mt.key(), pm);
|
QPixmapCache::insert(mt.key(), pm);
|
||||||
|
|
||||||
QPointF tp(tl.x() + (mt.xy().x() - tile.x()) * tileSize() * f,
|
QPoint tc(tileCoordinates(mt.xy().x(), mt.xy().y(), base));
|
||||||
tl.y() + (mt.xy().y() - tile.y()) * tileSize() * f);
|
QPointF tp(tl.x() + (tc.x() - tile.x()) * tileSize() * f,
|
||||||
|
tl.y() + (tc.y() - tile.y()) * tileSize() * f);
|
||||||
drawTile(painter, pm, tp);
|
drawTile(painter, pm, tp);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user