Skip to content

Commit

Permalink
Fixed broken map scale (ruler) on HiDPI maps
Browse files Browse the repository at this point in the history
  • Loading branch information
tumic0 committed Dec 18, 2023
1 parent aa892f6 commit 112dc59
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/map/aqmmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ int AQMMap::zoomFit(const QSize &size, const RectC &rect)
qreal AQMMap::resolution(const QRectF &rect)
{
const Zoom &z = _zooms.at(_zoom);
return OSM::resolution(rect.center(), z.zoom, z.tileSize);
return OSM::resolution(rect.center(), z.zoom, tileSize());
}

int AQMMap::zoomIn()
Expand Down
2 changes: 1 addition & 1 deletion src/map/gemfmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ GEMFMap::GEMFMap(const QString &fileName, QObject *parent)

qreal GEMFMap::resolution(const QRectF &rect)
{
return OSM::resolution(rect.center(), _zooms.at(_zi).level, _tileSize);
return OSM::resolution(rect.center(), _zooms.at(_zi).level, tileSize());
}

int GEMFMap::zoomFit(const QSize &size, const RectC &rect)
Expand Down
2 changes: 1 addition & 1 deletion src/map/mbtilesmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ int MBTilesMap::zoomFit(const QSize &size, const RectC &rect)

qreal MBTilesMap::resolution(const QRectF &rect)
{
return OSM::resolution(rect.center(), _zooms.at(_zi).z, _tileSize);
return OSM::resolution(rect.center(), _zooms.at(_zi).z, tileSize());
}

int MBTilesMap::zoomIn()
Expand Down
2 changes: 1 addition & 1 deletion src/map/onlinemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int OnlineMap::zoomFit(const QSize &size, const RectC &rect)

qreal OnlineMap::resolution(const QRectF &rect)
{
return OSM::resolution(rect.center(), _zoom, _tileSize);
return OSM::resolution(rect.center(), _zoom, tileSize());
}

int OnlineMap::zoomIn()
Expand Down
2 changes: 1 addition & 1 deletion src/map/osmdroidmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ int OsmdroidMap::zoomFit(const QSize &size, const RectC &rect)

qreal OsmdroidMap::resolution(const QRectF &rect)
{
return OSM::resolution(rect.center(), _zoom, _tileSize);
return OSM::resolution(rect.center(), _zoom, tileSize());
}

int OsmdroidMap::zoomIn()
Expand Down
2 changes: 1 addition & 1 deletion src/map/sqlitemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int SqliteMap::zoomFit(const QSize &size, const RectC &rect)

qreal SqliteMap::resolution(const QRectF &rect)
{
return OSM::resolution(rect.center(), _zoom, _tileSize);
return OSM::resolution(rect.center(), _zoom, tileSize());
}

int SqliteMap::zoomIn()
Expand Down

0 comments on commit 112dc59

Please sign in to comment.