1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Only shift the top left corner

This commit is contained in:
Martin Tůma 2021-04-16 22:56:34 +02:00
parent b65682a828
commit cdd5c47da3

View File

@ -408,17 +408,12 @@ RectC MapData::bounds() const
{
/* Align the map bounds with the OSM tiles to prevent area overlap artifacts
at least when using EPSG:3857 projection. */
int zoom = _subFiles.last().base;
QPoint tl(OSM::mercator2tile(OSM::ll2m(_bounds.topLeft()), zoom));
QPoint br(OSM::mercator2tile(OSM::ll2m(_bounds.bottomRight()), zoom));
Coordinates ctl(OSM::tile2ll(tl, zoom));
ctl.rlat() = -ctl.lat();
Coordinates cbr(OSM::tile2ll(br, zoom));
cbr.rlat() = -cbr.lat();
return RectC(ctl, cbr);
return RectC(ctl, _bounds.bottomRight());
}
void MapData::load()