mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-27 08:54:23 +02:00
Do not depend on the file extension when loading the maps
This commit is contained in:
@ -23,8 +23,10 @@ MapsforgeMap::MapsforgeMap(const QString &fileName, QObject *parent)
|
||||
: Map(fileName, parent), _data(fileName), _zoom(0),
|
||||
_projection(PCS::pcs(3857)), _tileRatio(1.0)
|
||||
{
|
||||
_zoom = _data.zooms().min();
|
||||
updateTransform();
|
||||
if (_data.isValid()) {
|
||||
_zoom = _data.zooms().min();
|
||||
updateTransform();
|
||||
}
|
||||
}
|
||||
|
||||
void MapsforgeMap::load()
|
||||
@ -233,3 +235,11 @@ void MapsforgeMap::setOutputProjection(const Projection &projection)
|
||||
updateTransform();
|
||||
QPixmapCache::clear();
|
||||
}
|
||||
|
||||
Map *MapsforgeMap::create(const QString &path, const Projection &, bool *isMap)
|
||||
{
|
||||
if (isMap)
|
||||
*isMap = false;
|
||||
|
||||
return new MapsforgeMap(path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user