mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Added missing fallback elevation fetch
This commit is contained in:
parent
4d17dd5b92
commit
73fa197c25
@ -269,18 +269,22 @@ void IMGMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
|||||||
|
|
||||||
double IMGMap::elevation(const Coordinates &c)
|
double IMGMap::elevation(const Coordinates &c)
|
||||||
{
|
{
|
||||||
QList<MapData::Elevation> tiles;
|
|
||||||
DEM::DEMTRee tree;
|
|
||||||
MapData *d = _data.first();
|
MapData *d = _data.first();
|
||||||
double ele = NAN;
|
|
||||||
|
|
||||||
d->elevations(RectC(Coordinates(c), Coordinates(c)), d->zooms().max(),
|
if (d->hasDEM()) {
|
||||||
&tiles);
|
QList<MapData::Elevation> tiles;
|
||||||
|
DEM::DEMTRee tree;
|
||||||
|
double ele = NAN;
|
||||||
|
|
||||||
DEM::buildTree(tiles, tree);
|
d->elevations(RectC(Coordinates(c), Coordinates(c)), d->zooms().max(),
|
||||||
DEM::searchTree(tree, c, ele);
|
&tiles);
|
||||||
|
|
||||||
return ele;
|
DEM::buildTree(tiles, tree);
|
||||||
|
DEM::searchTree(tree, c, ele);
|
||||||
|
|
||||||
|
return ele;
|
||||||
|
} else
|
||||||
|
return Map::elevation(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map* IMGMap::createIMG(const QString &path, const Projection &proj, bool *isDir)
|
Map* IMGMap::createIMG(const QString &path, const Projection &proj, bool *isDir)
|
||||||
|
Loading…
Reference in New Issue
Block a user