]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/gui/map/MapTileManager.java
Never overzoom when initially opening a track
[GpsPrune.git] / src / tim / prune / gui / map / MapTileManager.java
index 03b364aa66ca919fe4557ae75c19fee495cf3e91..233e4d9cfdac9d96f356e2bd4e2de57c500015bd 100644 (file)
@@ -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;
+
        }
 
        /**