]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/gui/Viewport.java
Merge remote-tracking branch 'upstream/master' into fp-integration
[GpsPrune.git] / src / tim / prune / gui / Viewport.java
index 38620e474ce6b78b7d72a06e2ce35303d7acbd3d..56711a3093bbb69ee6e6f64dfed96b1342c84771 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();
+       }
 }