1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-24 23:44:25 +02:00

Added missing MG maps HiDPI displays support

This commit is contained in:
2022-05-10 01:05:30 +02:00
parent 2df916eb95
commit 8ee21a8080
4 changed files with 33 additions and 26 deletions

View File

@ -41,7 +41,8 @@ static QList<MapData*> overlays(const QString &fileName)
}
IMGMap::IMGMap(const QString &fileName, QObject *parent)
: Map(fileName, parent), _projection(PCS::pcs(3857)), _valid(false)
: Map(fileName, parent), _projection(PCS::pcs(3857)), _tileRatio(1.0),
_valid(false)
{
if (GMAPData::isGMAP(fileName))
_data.append(new GMAPData(fileName));
@ -182,8 +183,8 @@ void IMGMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
_zoom, &points);
tiles.append(RasterTile(this, _data.at(n)->style(), _zoom,
QRect(ttl, QSize(TILE_SIZE, TILE_SIZE)), key, polygons,
lines, points));
QRect(ttl, QSize(TILE_SIZE, TILE_SIZE)), _tileRatio, key,
polygons, lines, points));
}
}
}
@ -200,6 +201,13 @@ void IMGMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
}
}
void IMGMap::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
{
Q_UNUSED(mapRatio);
_tileRatio = deviceRatio;
}
void IMGMap::setOutputProjection(const Projection &projection)
{
if (projection == _projection)