Fixed Conflicts when merging ConnectMaps
This commit is contained in:
@@ -50,6 +50,7 @@ public class App extends Application
|
|||||||
InputStream in = getClass().getClassLoader().getResourceAsStream("menu.fxml");
|
InputStream in = getClass().getClassLoader().getResourceAsStream("menu.fxml");
|
||||||
mainContainer = (VBox) loader.load(in);
|
mainContainer = (VBox) loader.load(in);
|
||||||
Scene scene = new Scene(mainContainer, 800, 600);
|
Scene scene = new Scene(mainContainer, 800, 600);
|
||||||
|
primaryStage.setResizable(false);
|
||||||
primaryStage.setScene(scene);
|
primaryStage.setScene(scene);
|
||||||
primaryStage.sizeToScene();
|
primaryStage.sizeToScene();
|
||||||
MenuController menuController = (MenuController) loader.getController();
|
MenuController menuController = (MenuController) loader.getController();
|
||||||
@@ -135,6 +136,7 @@ public class App extends Application
|
|||||||
System.out.println("Missing Session Class");
|
System.out.println("Missing Session Class");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
session = new Session();
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -753,6 +753,7 @@ public class Dataset {
|
|||||||
airportsByIATA.put(airport.getIATA_FFA(), airport);
|
airportsByIATA.put(airport.getIATA_FFA(), airport);
|
||||||
airportsByICAO.put(airport.getICAO(), airport);
|
airportsByICAO.put(airport.getICAO(), airport);
|
||||||
airport.setCountry(countryDictionary.get(airport.getCountryName()));
|
airport.setCountry(countryDictionary.get(airport.getCountryName()));
|
||||||
|
//airport.getCountry().setPosition(new Position(airport.getLatitude(), airport.getLongitude()));
|
||||||
//TODO Add City in country (This is extra work).
|
//TODO Add City in country (This is extra work).
|
||||||
airport.setCity(cityDictionary.get(airport.getCityName()));
|
airport.setCity(cityDictionary.get(airport.getCityName()));
|
||||||
airport.getCity().addAirport(airport);
|
airport.getCity().addAirport(airport);
|
||||||
@@ -911,8 +912,8 @@ public class Dataset {
|
|||||||
airportToAdd.setID(airportID);
|
airportToAdd.setID(airportID);
|
||||||
airports.add(airportToAdd);
|
airports.add(airportToAdd);
|
||||||
airportDictionary.put(airportToAdd.getName(), airportToAdd);
|
airportDictionary.put(airportToAdd.getName(), airportToAdd);
|
||||||
stmt.close();
|
|
||||||
airportIDRes.close();
|
airportIDRes.close();
|
||||||
|
stmt.close();
|
||||||
c.close();
|
c.close();
|
||||||
} catch ( Exception e ) {
|
} catch ( Exception e ) {
|
||||||
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ public enum SceneCode {
|
|||||||
INITIAL(""), AIRLINE_SUMMARY("airline_summary.fxml"), AIRLINE_RAW_DATA("airline_raw_data.fxml"),
|
INITIAL(""), AIRLINE_SUMMARY("airline_summary.fxml"), AIRLINE_RAW_DATA("airline_raw_data.fxml"),
|
||||||
AIRPORT_SUMMARY("airport_summary.fxml"), AIRPORT_RAW_DATA("airport_raw_data.fxml"),
|
AIRPORT_SUMMARY("airport_summary.fxml"), AIRPORT_RAW_DATA("airport_raw_data.fxml"),
|
||||||
ROUTE_SUMMARY("routes_summary.fxml"), ROUTE_RAW_DATA("route_raw_data.fxml"), FLIGHT_SUMMARY("flight_data_summary.fxml"),
|
ROUTE_SUMMARY("routes_summary.fxml"), ROUTE_RAW_DATA("route_raw_data.fxml"), FLIGHT_SUMMARY("flight_data_summary.fxml"),
|
||||||
FLIGHT_RAW_DATA("flight_raw_data.fxml"), AIRPORT_ANALYSER("airport_analyser.fxml"), ROUTE_ANALYSER("route_analyser.fxml");;
|
FLIGHT_RAW_DATA("flight_raw_data.fxml"), AIRPORT_ANALYSER("airport_analyser.fxml"), ROUTE_ANALYSER("route_analyser.fxml");
|
||||||
|
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
|
|||||||
@@ -366,7 +366,6 @@ public class Airport {
|
|||||||
}
|
}
|
||||||
public void hasDuplicate(Airport airport) throws DataException{
|
public void hasDuplicate(Airport airport) throws DataException{
|
||||||
if (airport.getName().equals("") || airport.getName().equals(this.name)){
|
if (airport.getName().equals("") || airport.getName().equals(this.name)){
|
||||||
//System.out.println(airport.getName() + " "+ this.name);
|
|
||||||
throw new DataException("Airport Name already Exists, Please Choose Another.");
|
throw new DataException("Airport Name already Exists, Please Choose Another.");
|
||||||
}
|
}
|
||||||
if (!airport.getIATA_FFA().equals("") && airport.getIATA_FFA().equals(this.name)){
|
if (!airport.getIATA_FFA().equals("") && airport.getIATA_FFA().equals(this.name)){
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ public class Country {
|
|||||||
private String DST, name;
|
private String DST, name;
|
||||||
private ArrayList<City> cities = new ArrayList<City>();
|
private ArrayList<City> cities = new ArrayList<City>();
|
||||||
private ArrayList<Airline> airlines = new ArrayList<Airline>();
|
private ArrayList<Airline> airlines = new ArrayList<Airline>();
|
||||||
|
private Position position;
|
||||||
|
|
||||||
public Country(String DST, String name){
|
public Country(String DST, String name){
|
||||||
this.DST = DST;
|
this.DST = DST;
|
||||||
@@ -81,4 +82,16 @@ public class Country {
|
|||||||
public void delCities(int index){
|
public void delCities(int index){
|
||||||
this.cities.remove(index);
|
this.cities.remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList<City> getCities() {
|
||||||
|
return cities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Position getPosition() {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosition(Position position) {
|
||||||
|
this.position = position;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,22 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.beans.value.ChangeListener;
|
||||||
|
import javafx.beans.value.ObservableValue;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.TableColumn;
|
import javafx.scene.control.TableColumn;
|
||||||
import javafx.scene.control.TableView;
|
import javafx.scene.control.TableView;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
|
import javafx.scene.web.WebView;
|
||||||
import seng202.group9.Controller.App;
|
import seng202.group9.Controller.App;
|
||||||
import seng202.group9.Controller.Dataset;
|
import seng202.group9.Controller.Dataset;
|
||||||
import seng202.group9.Controller.SceneCode;
|
import seng202.group9.Controller.SceneCode;
|
||||||
import seng202.group9.Core.Airline;
|
import seng202.group9.Core.Airline;
|
||||||
|
import seng202.group9.Core.Airport;
|
||||||
|
import seng202.group9.Core.Position;
|
||||||
|
import seng202.group9.Core.RoutePath;
|
||||||
|
import seng202.group9.Map.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by michael on 14/09/2016.
|
* Created by michael on 14/09/2016.
|
||||||
@@ -18,6 +25,8 @@ public class AirlineSummaryController extends Controller{
|
|||||||
@FXML
|
@FXML
|
||||||
private TableView<Airline> tableView;
|
private TableView<Airline> tableView;
|
||||||
@FXML
|
@FXML
|
||||||
|
private WebView mapView;
|
||||||
|
@FXML
|
||||||
private TableColumn<Airline, String> columnName;
|
private TableColumn<Airline, String> columnName;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> columnAlias;
|
private TableColumn<Airline, String> columnAlias;
|
||||||
@@ -30,14 +39,28 @@ public class AirlineSummaryController extends Controller{
|
|||||||
|
|
||||||
private Dataset currentData = null;
|
private Dataset currentData = null;
|
||||||
|
|
||||||
|
private Map map;
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
columnName.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
|
columnName.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
|
||||||
columnAlias.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
columnAlias.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
||||||
columnCountry.setCellValueFactory(new PropertyValueFactory<Airline, String>("Country"));
|
columnCountry.setCellValueFactory(new PropertyValueFactory<Airline, String>("CountryName"));
|
||||||
columnIATA.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
columnIATA.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
||||||
columnActive.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
columnActive.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
||||||
currentData = getParent().getCurrentDataset();
|
currentData = getParent().getCurrentDataset();
|
||||||
tableView.setItems(FXCollections.observableArrayList(currentData.getAirlines()));
|
tableView.setItems(FXCollections.observableArrayList(currentData.getAirlines()));
|
||||||
|
map = new Map(mapView, new RoutePath());
|
||||||
|
tableView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Airline>() {
|
||||||
|
public void changed(ObservableValue<? extends Airline> observable, Airline oldValue, Airline newValue) {
|
||||||
|
Airline selectedAirline= currentData.getAirlines().get(tableView.getSelectionModel().getSelectedIndices().get(0));
|
||||||
|
for (int i = 0 ; i < currentData.getAirports().size(); i ++){
|
||||||
|
if (currentData.getAirports().get(i).getCountryName().equals(selectedAirline.getCountryName())){
|
||||||
|
map.displayAirport(new RoutePath(new Position(currentData.getAirports().get(i).getLatitude(), currentData.getAirports().get(i).getLongitude())));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void airlineRawDataButton() {
|
public void airlineRawDataButton() {
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.beans.value.ChangeListener;
|
||||||
|
import javafx.beans.value.ObservableValue;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.TableColumn;
|
import javafx.scene.control.TableColumn;
|
||||||
import javafx.scene.control.TableView;
|
import javafx.scene.control.TableView;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
|
import javafx.scene.web.WebView;
|
||||||
import seng202.group9.Controller.App;
|
import seng202.group9.Controller.App;
|
||||||
import seng202.group9.Controller.Dataset;
|
import seng202.group9.Controller.Dataset;
|
||||||
import seng202.group9.Controller.SceneCode;
|
import seng202.group9.Controller.SceneCode;
|
||||||
import seng202.group9.Core.Airport;
|
import seng202.group9.Core.Airport;
|
||||||
|
import seng202.group9.Core.Position;
|
||||||
|
import seng202.group9.Core.RoutePath;
|
||||||
|
import seng202.group9.Map.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by michael on 14/09/2016.
|
* Created by michael on 14/09/2016.
|
||||||
@@ -17,6 +23,8 @@ public class AirportSummaryController extends Controller{
|
|||||||
@FXML
|
@FXML
|
||||||
private TableView<Airport> tableView;
|
private TableView<Airport> tableView;
|
||||||
@FXML
|
@FXML
|
||||||
|
private WebView mapView;
|
||||||
|
@FXML
|
||||||
private TableColumn<Airport, String> columnName;
|
private TableColumn<Airport, String> columnName;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> columnCity;
|
private TableColumn<Airport, String> columnCity;
|
||||||
@@ -29,6 +37,8 @@ public class AirportSummaryController extends Controller{
|
|||||||
|
|
||||||
private Dataset currentData = null;
|
private Dataset currentData = null;
|
||||||
|
|
||||||
|
private Map map;
|
||||||
|
|
||||||
public void airportRawDataButton() {
|
public void airportRawDataButton() {
|
||||||
replaceSceneContent(SceneCode.AIRLINE_RAW_DATA);
|
replaceSceneContent(SceneCode.AIRLINE_RAW_DATA);
|
||||||
}
|
}
|
||||||
@@ -51,5 +61,13 @@ public class AirportSummaryController extends Controller{
|
|||||||
columnAltitude.setCellValueFactory(new PropertyValueFactory<Airport, String>("Altitude"));
|
columnAltitude.setCellValueFactory(new PropertyValueFactory<Airport, String>("Altitude"));
|
||||||
currentData = getParent().getCurrentDataset();
|
currentData = getParent().getCurrentDataset();
|
||||||
tableView.setItems(FXCollections.observableArrayList(currentData.getAirports()));
|
tableView.setItems(FXCollections.observableArrayList(currentData.getAirports()));
|
||||||
|
map = new Map(mapView, new RoutePath());
|
||||||
|
tableView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Airport>() {
|
||||||
|
public void changed(ObservableValue<? extends Airport> observable, Airport oldValue, Airport newValue) {
|
||||||
|
System.out.println("loading");
|
||||||
|
Airport selectedAirport= currentData.getAirports().get(tableView.getSelectionModel().getSelectedIndices().get(0));
|
||||||
|
map.displayAirport(new RoutePath( new Position(selectedAirport.getLatitude(), selectedAirport.getLongitude())));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ public class FlightSummaryController extends Controller {
|
|||||||
}
|
}
|
||||||
flightPathListView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
|
flightPathListView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
|
||||||
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
|
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
|
||||||
map.displayRoute(theDataSet.getFlightPaths().get(flightPathListView.getSelectionModel().getSelectedIndices().get(0)).getRoutePath());
|
//map.displayRoute(theDataSet.getFlightPaths().get(flightPathListView.getSelectionModel().getSelectedIndices().get(0)).getRoutePath());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.beans.value.ChangeListener;
|
||||||
|
import javafx.beans.value.ObservableValue;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.TableColumn;
|
import javafx.scene.control.TableColumn;
|
||||||
import javafx.scene.control.TableView;
|
import javafx.scene.control.TableView;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
|
import javafx.scene.web.WebView;
|
||||||
import seng202.group9.Controller.App;
|
import seng202.group9.Controller.App;
|
||||||
import seng202.group9.Controller.Dataset;
|
import seng202.group9.Controller.Dataset;
|
||||||
import seng202.group9.Controller.SceneCode;
|
import seng202.group9.Controller.SceneCode;
|
||||||
|
import seng202.group9.Core.Position;
|
||||||
import seng202.group9.Core.Route;
|
import seng202.group9.Core.Route;
|
||||||
|
import seng202.group9.Core.RoutePath;
|
||||||
|
import seng202.group9.Map.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by michael on 14/09/2016.
|
* Created by michael on 14/09/2016.
|
||||||
@@ -17,6 +23,8 @@ public class RouteSummaryController extends Controller{
|
|||||||
@FXML
|
@FXML
|
||||||
private TableView<Route> tableView;
|
private TableView<Route> tableView;
|
||||||
@FXML
|
@FXML
|
||||||
|
private WebView mapView;
|
||||||
|
@FXML
|
||||||
private TableColumn<Route, String> columnAirline;
|
private TableColumn<Route, String> columnAirline;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Route, String> columnDepart;
|
private TableColumn<Route, String> columnDepart;
|
||||||
@@ -27,16 +35,39 @@ public class RouteSummaryController extends Controller{
|
|||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Route, String> columnEquipment;
|
private TableColumn<Route, String> columnEquipment;
|
||||||
|
|
||||||
|
private Map map;
|
||||||
|
|
||||||
private Dataset currentData = null;
|
private Dataset currentData = null;
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
columnAirline.setCellValueFactory(new PropertyValueFactory<Route, String>("Airline"));
|
columnAirline.setCellValueFactory(new PropertyValueFactory<Route, String>("AirlineName"));
|
||||||
columnDepart.setCellValueFactory(new PropertyValueFactory<Route, String>("DepartureAirport"));
|
columnDepart.setCellValueFactory(new PropertyValueFactory<Route, String>("DepartureAirport"));
|
||||||
columnArrive.setCellValueFactory(new PropertyValueFactory<Route, String>("ArrivalAirport"));
|
columnArrive.setCellValueFactory(new PropertyValueFactory<Route, String>("ArrivalAirport"));
|
||||||
columnStops.setCellValueFactory(new PropertyValueFactory<Route, String>("Stops"));
|
columnStops.setCellValueFactory(new PropertyValueFactory<Route, String>("Stops"));
|
||||||
columnEquipment.setCellValueFactory(new PropertyValueFactory<Route, String>("Equipment"));
|
columnEquipment.setCellValueFactory(new PropertyValueFactory<Route, String>("Equipment"));
|
||||||
currentData = getParent().getCurrentDataset();
|
currentData = getParent().getCurrentDataset();
|
||||||
tableView.setItems(FXCollections.observableArrayList(currentData.getRoutes()));
|
tableView.setItems(FXCollections.observableArrayList(currentData.getRoutes()));
|
||||||
|
map = new Map(mapView, new RoutePath());
|
||||||
|
tableView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Route>() {
|
||||||
|
public void changed(ObservableValue<? extends Route> observable, Route oldValue, Route newValue) {
|
||||||
|
System.out.println("loading");
|
||||||
|
Route selectedRoute= currentData.getRoutes().get(tableView.getSelectionModel().getSelectedIndices().get(0));
|
||||||
|
if (selectedRoute.getSourceAirport() != null && selectedRoute.getDestinationAirport() != null) {
|
||||||
|
map.displayRoute(new RoutePath(
|
||||||
|
new Position(selectedRoute.getSourceAirport().getLatitude(), selectedRoute.getSourceAirport().getLongitude()),
|
||||||
|
new Position(selectedRoute.getDestinationAirport().getLatitude(), selectedRoute.getDestinationAirport().getLongitude())
|
||||||
|
));
|
||||||
|
}else if (selectedRoute.getSourceAirport() == null && selectedRoute.getDestinationAirport() != null){
|
||||||
|
map.displayAirport(new RoutePath(
|
||||||
|
new Position(selectedRoute.getDestinationAirport().getLatitude(), selectedRoute.getDestinationAirport().getLongitude())
|
||||||
|
));
|
||||||
|
}else if (selectedRoute.getSourceAirport() != null && selectedRoute.getDestinationAirport() == null){
|
||||||
|
map.displayAirport(new RoutePath(
|
||||||
|
new Position(selectedRoute.getSourceAirport().getLatitude(), selectedRoute.getSourceAirport().getLongitude())
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
public void routeRawDataButton() {
|
public void routeRawDataButton() {
|
||||||
replaceSceneContent(SceneCode.ROUTE_RAW_DATA);
|
replaceSceneContent(SceneCode.ROUTE_RAW_DATA);
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ public class Map {
|
|||||||
webEngine.load(getClass().getClassLoader().getResource("map.html").toExternalForm());
|
webEngine.load(getClass().getClassLoader().getResource("map.html").toExternalForm());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void displayAirport(RoutePath newRoute) {
|
||||||
|
String scriptToExecute = "displayAirport(" + newRoute.toJSONArray() + ");";
|
||||||
|
webEngine.executeScript(scriptToExecute);
|
||||||
|
}
|
||||||
|
|
||||||
public void displayRoute(RoutePath newRoute) {
|
public void displayRoute(RoutePath newRoute) {
|
||||||
String scriptToExecute = "displayRoute(" + newRoute.toJSONArray() + ");";
|
String scriptToExecute = "displayRoute(" + newRoute.toJSONArray() + ");";
|
||||||
webEngine.executeScript(scriptToExecute);
|
webEngine.executeScript(scriptToExecute);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
function initMap() {
|
function initMap() {
|
||||||
map = new google.maps.Map(document.getElementById('map'), {
|
map = new google.maps.Map(document.getElementById('map'), {
|
||||||
center: {lat: 39.144684, lng: -84.510079},
|
center: {lat: 39.144684, lng: -84.510079},
|
||||||
zoom: 15
|
zoom: 5
|
||||||
});
|
});
|
||||||
|
|
||||||
new google.maps.Marker({
|
new google.maps.Marker({
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
function displayAirport(position){
|
function displayAirport(position){
|
||||||
map = new google.maps.Map(document.getElementById('map'), {
|
map = new google.maps.Map(document.getElementById('map'), {
|
||||||
center: position[0],
|
center: position[0],
|
||||||
zoom: 15
|
zoom: 5
|
||||||
});
|
});
|
||||||
|
|
||||||
new google.maps.Marker({
|
new google.maps.Marker({
|
||||||
@@ -50,6 +50,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function displayRoute(flightPath) {
|
function displayRoute(flightPath) {
|
||||||
|
map = new google.maps.Map(document.getElementById('map'), {
|
||||||
|
center: {lat: 39.144684, lng: -84.510079},
|
||||||
|
zoom: 15
|
||||||
|
});
|
||||||
// CLEAR EXISTING MARKERS
|
// CLEAR EXISTING MARKERS
|
||||||
if (marker1 !== undefined && marker2 !== undefined && path !== undefined) {
|
if (marker1 !== undefined && marker2 !== undefined && path !== undefined) {
|
||||||
marker1.setMap(null);
|
marker1.setMap(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user