diff --git a/src/Map.java b/src/Map.java index abfd465..6c91085 100644 --- a/src/Map.java +++ b/src/Map.java @@ -1,15 +1,15 @@ -import java.util.*; - public class Map { private MapLongitude mapLongitude; private Longitude longitude; private MapLatitude mapLatitude; private Latitude latitude; + private Presenter presenter; public Map() { this.mapLongitude = new MapLongitude(); this.longitude = new Longitude(mapLongitude); this.mapLatitude = new MapLatitude(); this.latitude = new Latitude(mapLatitude); + this.presenter = new Presenter(mapLongitude, mapLatitude, longitude, latitude); } public double getMapLongitude() { return mapLongitude.getValue(); @@ -18,8 +18,7 @@ return longitude.getValue(); } public void updateGPS(double lat2, double long2) { - this.longitude.updateGPS(lat2, long2); - this.latitude.updateGPS(lat2, long2); + this.presenter.updateGPS(lat2, long2); } public double getMapLatitude() { return mapLatitude.getValue(); @@ -27,4 +26,13 @@ public double getLatitude() { return latitude.getValue(); } + // �����X�V��ON/OFF��؂�ւ��郁�\�b�h + public void setAutoUpdateEnabled(boolean enabled) { + presenter.setAutoUpdateEnabled(enabled); + } + + // �蓮�X�V�̂��߂̃��\�b�h + public void manualUpdate() { + presenter.manualUpdate(); + } } \ No newline at end of file