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

Fixed gap between the basemap and normal map tiles on some maps

This commit is contained in:
Martin Tůma 2020-02-13 22:49:15 +01:00
parent 7b03c4d852
commit d670107a11

View File

@ -240,15 +240,15 @@ void TREFile::clear()
int TREFile::level(int bits, bool baseMap) int TREFile::level(int bits, bool baseMap)
{ {
int idx = _firstLevel;
if (baseMap) { if (baseMap) {
if (!_isBaseMap && _levels.at(idx).bits > bits) if (!_isBaseMap && _levels.first().bits > bits)
return -1; return -1;
if (_isBaseMap && bits > _levels.last().bits) if (_isBaseMap && bits > _levels.last().bits)
return -1; return -1;
} }
int idx = _firstLevel;
for (int i = idx + 1; i < _levels.size(); i++) { for (int i = idx + 1; i < _levels.size(); i++) {
if (_levels.at(i).bits > bits) if (_levels.at(i).bits > bits)
break; break;