X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Ftim%2Fprune%2Fgui%2Fmap%2FMapTileManager.java;h=d1e0047a2bc2624284308fad0f4ab1ea9df2dc09;hb=199927b72325862643fe3c79112ffec039dd0064;hp=f7370c5c90c833e7f053fc786eafdae37ab7f843;hpb=23bedfb97ad39c197657072b3b1f64462c148bea;p=GpsPrune.git diff --git a/src/tim/prune/gui/map/MapTileManager.java b/src/tim/prune/gui/map/MapTileManager.java index f7370c5..d1e0047 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; + } /**