mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Compare commits
2 Commits
1b83f88b27
...
6e40d8cbc7
Author | SHA1 | Date | |
---|---|---|---|
6e40d8cbc7 | |||
0ef28cda0f |
@ -206,7 +206,7 @@ void OruxMap::calibrationPoints(QXmlStreamReader &reader, const QSize &size,
|
||||
void OruxMap::mapCalibration(QXmlStreamReader &reader, int level)
|
||||
{
|
||||
int zoom;
|
||||
QSize tileSize, size;
|
||||
QSize tileSize, size, calibrationSize;
|
||||
QString datum, projection;
|
||||
QList<CalibrationPoint> points;
|
||||
Projection proj;
|
||||
@ -241,6 +241,8 @@ void OruxMap::mapCalibration(QXmlStreamReader &reader, int level)
|
||||
|
||||
tileSize = QSize(width, height);
|
||||
size = QSize(xMax * width, yMax * height);
|
||||
calibrationSize = size;
|
||||
|
||||
GCS gcs(createGCS(datum));
|
||||
if (!gcs.isValid()) {
|
||||
reader.raiseError(QString("%1: invalid/unknown datum")
|
||||
@ -254,9 +256,22 @@ void OruxMap::mapCalibration(QXmlStreamReader &reader, int level)
|
||||
return;
|
||||
}
|
||||
|
||||
reader.readElementText();
|
||||
|
||||
} else if (reader.name() == QLatin1String("MapDimensions")) {
|
||||
int height, width;
|
||||
|
||||
QXmlStreamAttributes attr = reader.attributes();
|
||||
if (!intAttr(reader, attr, "height", height))
|
||||
return;
|
||||
if (!intAttr(reader, attr, "width", width))
|
||||
return;
|
||||
|
||||
calibrationSize = QSize(width, height);
|
||||
|
||||
reader.readElementText();
|
||||
} else if (reader.name() == QLatin1String("CalibrationPoints"))
|
||||
calibrationPoints(reader, size, points);
|
||||
calibrationPoints(reader, calibrationSize, points);
|
||||
else
|
||||
reader.skipCurrentElement();
|
||||
}
|
||||
@ -467,7 +482,7 @@ Coordinates OruxMap::xy2ll(const QPointF &p)
|
||||
Map *OruxMap::create(const QString &path, const Projection &, bool *isDir)
|
||||
{
|
||||
if (isDir)
|
||||
*isDir = false;
|
||||
*isDir = true;
|
||||
|
||||
return new OruxMap(path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user