Fix issue with sqlite 17th zoom

This commit is contained in:
Victor Shcherb 2012-12-28 16:30:52 +03:00
parent 22148b7e9a
commit 9454de091d

View file

@ -152,9 +152,9 @@ public class SQLiteTileSource implements ITileSource {
try { try {
long z; long z;
z = db.compileStatement("SELECT minzoom FROM info").simpleQueryForLong(); //$NON-NLS-1$ z = db.compileStatement("SELECT minzoom FROM info").simpleQueryForLong(); //$NON-NLS-1$
if (z < 17 && z >= 0) if (z < 17 )
baseZoom = 17 - (int)z; // sqlite base zoom, =11 for SRTM hillshade baseZoom = 17 - (int)z; // sqlite base zoom, =11 for SRTM hillshade
maxZoom = 17; // Cheat to have tiles request even if zoom level not in sqlite maxZoom = 24; // Cheat to have tiles request even if zoom level not in sqlite
// decrease maxZoom if too much scaling would be required // decrease maxZoom if too much scaling would be required
while ((tileSize >> (maxZoom - baseZoom)) < minScaledSize) while ((tileSize >> (maxZoom - baseZoom)) < minScaledSize)
maxZoom--; maxZoom--;