Refactored the setup for MarkObjects (now renamed Markers) and made the CompoundMark + Mark + GeoPoint classes the standard across all classes instead of GateMark + SingleMark + Mark.

#refactor
This commit is contained in:
Calum
2017-07-31 02:19:19 +12:00
parent 6cae338c1e
commit f1ad03e913
32 changed files with 452 additions and 756 deletions
@@ -7,11 +7,11 @@ package seng302.visualiser.map;
*
* Created by Haoming on 10/5/17
*/
class Boundary {
public class Boundary {
private double northLat, eastLng, southLat, westLng;
Boundary(double northLat, double eastLng, double southLat, double westLng) {
public Boundary(double northLat, double eastLng, double southLat, double westLng) {
this.northLat = northLat;
this.eastLng = eastLng;
this.southLat = southLat;
@@ -4,7 +4,7 @@ import java.net.URL;
import javafx.geometry.Point2D;
import javafx.scene.image.Image;
import javax.net.ssl.HttpsURLConnection;
import seng302.utilities.GeoPoint;
import seng302.model.GeoPoint;
/**
* CanvasMap retrieves a map image with given geo boundary from Google Map server.
@@ -22,12 +22,12 @@ public class CanvasMap {
private String KEY = "AIzaSyC-5oOShMCY5Oy_9L7guYMPUPFHDMr37wE";
CanvasMap(Boundary boundary) {
public CanvasMap(Boundary boundary) {
this.boundary = boundary;
calculateOptimalMapSize();
}
Image getMapImage() {
public Image getMapImage() {
try {
URL url = new URL(getRequest());
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
@@ -1,7 +1,7 @@
package seng302.visualiser.map;
import javafx.geometry.Point2D;
import seng302.utilities.GeoPoint;
import seng302.model.GeoPoint;
/**
* An utility class useful to convert between Geo locations and Mercator projection