parent
f3caf60f7a
commit
99db881d43
@ -252,7 +252,8 @@ public class TileRenderer {
|
||||
|
||||
logger.trace("Timings of cross-stitched tile X={} Y={} Zoom={}: render={} ms", tileX, tileY, zoom, diff);
|
||||
|
||||
cache.put(layer.id, tileX, tileY, zoom, data);
|
||||
if (zoom <= cfg.tileCacheMaxZoom())
|
||||
cache.put(layer.id, tileX, tileY, zoom, data);
|
||||
|
||||
if (tile == null)
|
||||
logger.error("Got a null-tile @ {}/{}/{} (data={})", tileX, tileY, zoom, data.length);
|
||||
@ -323,7 +324,8 @@ public class TileRenderer {
|
||||
timingImageSetup, timingZeroCountCheck, timingRender, timingBufferOutput
|
||||
);
|
||||
|
||||
cache.put(layer.id, tileX, tileY, zoom, data);
|
||||
if (zoom <= cfg.tileCacheMaxZoom())
|
||||
cache.put(layer.id, tileX, tileY, zoom, data);
|
||||
|
||||
if (tile == null)
|
||||
logger.error("Got a null-tile @ {}/{}/{} (layer={},data={})", tileX, tileY, zoom, layer.id, data.length);
|
||||
|
@ -98,6 +98,11 @@ public interface TileServerConfig extends Config {
|
||||
tile cache stuff
|
||||
*/
|
||||
|
||||
//max cached zoom, 12=default, 13=very file/storage-heavy
|
||||
@Key("tile.cache.maxzoom")
|
||||
@DefaultValue("12")
|
||||
int tileCacheMaxZoom();
|
||||
|
||||
@Key("tile.cache.impl")
|
||||
@DefaultValue("FILE")
|
||||
CacheType tileCacheType();
|
||||
|
@ -104,6 +104,7 @@ public class InitialTileRendererJob implements Runnable {
|
||||
double zProgress = (posz - minZ) / (double) zCount;
|
||||
|
||||
TileCoordinate tileCoordinate = CoordinateFactory.getTileCoordinateFromMapBlock(new MapBlockCoordinate(posx, posz));
|
||||
tileCoordinate = CoordinateFactory.getZoomedOutTile(tileCoordinate); //zoom out to 12 (max=13)
|
||||
|
||||
try {
|
||||
byte[] data = renderer.render(layer, tileCoordinate.x, tileCoordinate.y, tileCoordinate.zoom);
|
||||
|
@ -79,7 +79,7 @@ public class TileRoute implements Route {
|
||||
if (layer == null)
|
||||
throw new IllegalArgumentException("layer not found: " + layerid);
|
||||
|
||||
if (z < 2)
|
||||
if (z < 2 || z > 12)
|
||||
throw new IllegalArgumentException("Invalid zoom: " + z);
|
||||
|
||||
//check db cache
|
||||
|
@ -20,7 +20,7 @@ tileserver.start = function(cfg, layerConfig){
|
||||
|
||||
var map = L.map('image-map', {
|
||||
minZoom: 2,
|
||||
maxZoom: 13,
|
||||
maxZoom: 12,
|
||||
center: initialCenter,
|
||||
zoom: initialZoom,
|
||||
crs: crs
|
||||
|
@ -1,4 +1,4 @@
|
||||
#tilerenderer.initialrendering.enable=true
|
||||
tilerenderer.initialrendering.enable=true
|
||||
|
||||
#log.tile.updatetimings=true
|
||||
tilerenderer.updateinterval=10
|
||||
|
Loading…
x
Reference in New Issue
Block a user