X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Ftim%2Fprune%2Fgui%2Fmap%2FMapTileManager.java;h=b4a60c88b607a10cee8737f7ce80bd4c3b701e89;hb=2104ecd4a3ad9d14300659f506c705b2553bb6c3;hp=8c2c6eed9e3f7e70ccf251ba91e01ebe4f550be9;hpb=e1b5673e4d75ca65220125a30e5febd5dac71270;p=GpsPrune.git diff --git a/src/tim/prune/gui/map/MapTileManager.java b/src/tim/prune/gui/map/MapTileManager.java index 8c2c6ee..b4a60c8 100644 --- a/src/tim/prune/gui/map/MapTileManager.java +++ b/src/tim/prune/gui/map/MapTileManager.java @@ -70,10 +70,19 @@ public class MapTileManager implements ImageObserver * @return true if zoom is too high for tiles */ public boolean isOverzoomed() + { + return _zoom > getMaxZoomLevel(); + } + + /** + * @return the maximum useable zoom level for tiles + */ + public int getMaxZoomLevel() { // Ask current map source what maximum zoom is int maxZoom = (_mapSource == null?0:_mapSource.getMaxZoomLevel()); - return (_zoom > maxZoom); + return maxZoom; + } /**