Newer
Older
Map-Refactor / src / main / java / Map.java
Okina-kina on 6 Nov 2023 970 bytes initial commit
public class Map {
	private Latitude latitude;
	private MapLongitude mapLongitude;
	private Longitude longitude;
	private MapLatitude mapLatitude;
	private Presenter presenter;

	public Map() {
		this.latitude = new Latitude();
		this.mapLongitude = new MapLongitude();
		this.longitude = new Longitude();
		this.mapLatitude = new MapLatitude();
		this.presenter = new Presenter(longitude, latitude, mapLongitude, mapLatitude);
	}
	public double getLatitude() {
		return latitude.getValue();
	}
	public double getMapLongitude() {
		return mapLongitude.getValue();
	}
	public double getLongitude() {
		return longitude.getValue();
	}
	public double getMapLatitude() {
		return mapLatitude.getValue();
	}

	public void setAutoUpdate(boolean isAutoUpdate){
		this.presenter.setAutoUpdate(isAutoUpdate);
	}

	public void updateGPS(double lat2, double long2) {
		this.presenter.updateGPS(lat2, long2);
	}
	public void updateManually(){
		this.presenter.updateManually();
	}
}