mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-20 09:40:49 +01:00
Limit the overzoom to max 3 levels
This commit is contained in:
parent
58cd2a826d
commit
6f1f5fd965
@ -9,7 +9,7 @@
|
|||||||
#include "osm.h"
|
#include "osm.h"
|
||||||
#include "mbtilesmap.h"
|
#include "mbtilesmap.h"
|
||||||
|
|
||||||
|
#define MAX_OVERZOOM 3
|
||||||
#define META_TYPE(type) static_cast<QMetaType::Type>(type)
|
#define META_TYPE(type) static_cast<QMetaType::Type>(type)
|
||||||
|
|
||||||
static RectC str2bounds(const QString &str)
|
static RectC str2bounds(const QString &str)
|
||||||
@ -88,9 +88,13 @@ bool MBTilesMap::getZooms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_scalable) {
|
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));
|
_zooms.append(Zoom(i, _zooms.last().base));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_zi = _zooms.size() - 1;
|
_zi = _zooms.size() - 1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user