|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package seng202.group9.GUI;
|
|
|
|
|
|
|
|
|
|
import javafx.fxml.FXML;
|
|
|
|
|
import javafx.scene.control.Alert;
|
|
|
|
|
import javafx.scene.control.TableView;
|
|
|
|
|
import javafx.scene.web.WebView;
|
|
|
|
|
import seng202.group9.Controller.Dataset;
|
|
|
|
|
@ -24,6 +25,14 @@ public class PopUpAirportMapController extends Controller {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void load() {
|
|
|
|
|
//check if there is internet connectivity
|
|
|
|
|
if (!getParent().testInet("maps.google.com")){
|
|
|
|
|
Alert alert = new Alert(Alert.AlertType.WARNING);
|
|
|
|
|
alert.setTitle("No Internet Connection.");
|
|
|
|
|
alert.setHeaderText("Unable to Connect to Google Maps");
|
|
|
|
|
alert.setContentText("As we are unable to connect to Google Maps all applications which are supposed to display maps may not work as intended.");
|
|
|
|
|
alert.showAndWait();
|
|
|
|
|
}
|
|
|
|
|
dataset = getParent().getCurrentDataset();
|
|
|
|
|
loadAirports();
|
|
|
|
|
}
|
|
|
|
|
@ -36,12 +45,4 @@ public class PopUpAirportMapController extends Controller {
|
|
|
|
|
}
|
|
|
|
|
map = new Map(mapView, routePaths, Map.loadAirports);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void loadRoutes(ArrayList<Route> routes){
|
|
|
|
|
ArrayList<RoutePath> routePaths = new ArrayList<>();
|
|
|
|
|
for (Route route: routes){
|
|
|
|
|
routePaths.add(route.getRoutePath());
|
|
|
|
|
}
|
|
|
|
|
map.displayRoutes(routePaths);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|