diff --git a/src/Latitude.java b/src/Latitude.java index d9f9f3b..73d6a0e 100644 --- a/src/Latitude.java +++ b/src/Latitude.java @@ -1,5 +1,3 @@ -import java.util.*; - public class Latitude { private MapLatitude mapLatitude; private double value; @@ -9,8 +7,10 @@ public double getValue() { return this.value; } - public void updateGPS(double lat2, double long2) { - this.value = lat2; - this.mapLatitude.updateLatitude(this.value); - } + public void updateGPS(double lat2, double long2, boolean autoUpdate) { + this.value = lat2; + if (autoUpdate) { + this.mapLatitude.updateLatitude(this.value); + } + } } \ No newline at end of file