X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=src%2Ftim%2Fprune%2Fgui%2Fmap%2FMapTileManager.java;h=8c2c6eed9e3f7e70ccf251ba91e01ebe4f550be9;hp=f7370c5c90c833e7f053fc786eafdae37ab7f843;hb=HEAD;hpb=2302358503c38817e19f6e529f6c9e530aac0e86 diff --git a/src/tim/prune/gui/map/MapTileManager.java b/src/tim/prune/gui/map/MapTileManager.java index f7370c5..03b364a 100644 --- a/src/tim/prune/gui/map/MapTileManager.java +++ b/src/tim/prune/gui/map/MapTileManager.java @@ -162,6 +162,7 @@ public class MapTileManager implements ImageObserver tempCache = _tempCaches[inLayer]; // Should probably guard array indexes here tileImage = tempCache.getTile(inX, inY); if (tileImage != null) { + //System.out.println("Got tile from memory: " + inX + ", " + inY); return tileImage; } } @@ -195,7 +196,6 @@ public class MapTileManager implements ImageObserver try { URL tileUrl = new URL(_mapSource.makeURL(inLayer, _zoom, inX, inY)); - //System.out.println("Trying to fetch: " + tileUrl); if (useDisk) { DiskTileCacher.saveTile(tileUrl, diskCachePath, @@ -210,6 +210,9 @@ public class MapTileManager implements ImageObserver } } catch (MalformedURLException urle) {} // ignore + catch (CacheFailure cf) { + _consumer.reportCacheFailure(); + } } return tileImage; }