]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/gui/Viewport.java
Default to world map with drawing enabled
[GpsPrune.git] / src / tim / prune / gui / Viewport.java
index 25eba2fb1847306d41aed63021c7cbe3e4ed2cf0..aec78a61f7703e3f3f97807c5347a04a91743708 100644 (file)
@@ -40,4 +40,12 @@ public class Viewport
                double maxLon = MapUtils.getLongitudeFromX(mapPosition.getXFromPixels(width, width));
                return new double[] {minLat, minLon, maxLat, maxLon};
        }
+
+       /**
+        * Recentre the viewport on the data
+        */
+       public void recentreViewport()
+       {
+               _mapCanvas.zoomToFit();
+       }
 }