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

Map API refactoring

Including several map providers refactoring/rewrite
especial KML, JNX and TrekBuddy atlases.
This commit is contained in:
2023-05-04 09:38:35 +02:00
parent d593b073d5
commit 97e12d809f
60 changed files with 753 additions and 816 deletions

View File

@ -487,8 +487,14 @@ int OruxMap::zoomOut()
return _zoom;
}
void OruxMap::load()
void OruxMap::load(const Projection &in, const Projection &out,
qreal deviceRatio, bool hidpi)
{
Q_UNUSED(in);
Q_UNUSED(out);
_mapRatio = hidpi ? deviceRatio : 1.0;
if (_db.isValid())
_db.open();
}
@ -499,12 +505,6 @@ void OruxMap::unload()
_db.close();
}
void OruxMap::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
{
Q_UNUSED(deviceRatio);
_mapRatio = mapRatio;
}
QPixmap OruxMap::tile(const Zoom &z, int x, int y) const
{
if (_db.isValid()) {
@ -590,7 +590,7 @@ Coordinates OruxMap::xy2ll(const QPointF &p)
return z.projection.xy2ll(z.transform.img2proj(p * _mapRatio));
}
Map *OruxMap::create(const QString &path, const Projection &, bool *isDir)
Map *OruxMap::create(const QString &path, bool *isDir)
{
if (isDir)
*isDir = true;