1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Limit the overzoom to max 3 levels

This commit is contained in:
Martin Tůma 2023-12-10 15:34:39 +01:00
parent 58cd2a826d
commit 6f1f5fd965

View File

@ -9,7 +9,7 @@
#include "osm.h"
#include "mbtilesmap.h"
#define MAX_OVERZOOM 3
#define META_TYPE(type) static_cast<QMetaType::Type>(type)
static RectC str2bounds(const QString &str)
@ -88,8 +88,12 @@ bool MBTilesMap::getZooms()
}
if (_scalable) {
for (int i = _zooms.last().base + 1; i <= OSM::ZOOMS.max(); i++)
for (int i = _zooms.last().base + 1; i <= OSM::ZOOMS.max(); i++) {
Zoom z(i, _zooms.last().base);
if (z.z - z.base > MAX_OVERZOOM)
break;
_zooms.append(Zoom(i, _zooms.last().base));
}
}
_zi = _zooms.size() - 1;