Explorar el Código

Added UI functionality

- buttons to switch map view
- context menu on map 
- buttons to "walk" through waypoints
dominik hace 8 años
padre
commit
0fa807e997

+ 24 - 6
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/ButtonManager.java

@@ -101,7 +101,7 @@ public final class ButtonManager {
 			HashSet<GeoPosition> positions = new HashSet<GeoPosition>(WorldView.waypoints.size());
 			WorldView.waypoints.forEach((w) -> positions.add(w.getPosition()));
 			
-			WorldView.internMapViewer.zoomToBestFit(positions, 0.7);;
+			WorldView.internMapViewer.zoomToBestFit(positions, 1);
 		}
 	}
 
@@ -120,9 +120,6 @@ public final class ButtonManager {
 			// make properties editable again
 			controller.propertiesObjectColumn.setEditable(true);
 			
-			// enabel context menu
-			controller.properties.setRowFactory(PropertiesManager.rightClickCallback);
-
 			// show graph instead of map view
 			controller.swingNodeWorldView.setVisible(false);
 			controller.swingNode.setVisible(true);
@@ -135,8 +132,14 @@ public final class ButtonManager {
 			controller.pane.setMouseTransparent(false);
 			controller.swingNode.setMouseTransparent(false);
 			
-			// dont show center map Button
+			// dont show symbol layer Button
 			controller.centerMap.setVisible(false);
+			controller.defaultMapView.setVisible(false);
+			controller.roadMapView.setVisible(false);
+			controller.satelliteMapView.setVisible(false);
+			controller.hybridMapView.setVisible(false);
+			controller.previousWaypoint.setVisible(false);
+			controller.nextWaypoint.setVisible(false);
 			
 			// dont show properties of selected node or edge
 			PropertiesManager.showNewDataSet(null);
@@ -261,8 +264,14 @@ public final class ButtonManager {
 		// show VBox for map options
 		controller.symbolToolVBox.setVisible(true);
 		
-		// show center map Button
+		// show symbol layer Button
 		controller.centerMap.setVisible(true);
+		controller.defaultMapView.setVisible(true);
+		controller.roadMapView.setVisible(true);
+		controller.satelliteMapView.setVisible(true);
+		controller.hybridMapView.setVisible(true);
+		controller.previousWaypoint.setVisible(true);
+		controller.nextWaypoint.setVisible(true);
 
 		// standard server connection status is true
 		Boolean serverConnection = true;
@@ -395,4 +404,13 @@ public final class ButtonManager {
 		MapViewFunctions.changeMapView();
 	}
 
+	/**
+	 * select the given MapType in the ChoiceBox and change Map View
+	 * @param mapType
+	 */
+	public static void switchToMap(String mapType) {
+		controller.mapViewChoiceBox.getSelectionModel().select(mapType);
+		MapViewFunctions.changeMapView();
+	}
+
 }

+ 52 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/GUIController.java

@@ -16,6 +16,7 @@ import org.jxmapviewer.input.ZoomMouseWheelListenerCursor;
 import de.tu_darmstadt.informatik.tk.scopviz.main.Main;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.handlers.KeyboardShortcuts;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.handlers.ResizeListener;
+import de.tu_darmstadt.informatik.tk.scopviz.ui.mapView.MapViewFunctions;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.mapView.WorldView;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
@@ -67,6 +68,20 @@ public class GUIController implements Initializable {
 	public Button zoomOut;
 	@FXML
 	public Button centerMap;
+	
+	@FXML
+	public Button defaultMapView;
+	@FXML
+	public Button roadMapView;
+	@FXML
+	public Button satelliteMapView;
+	@FXML
+	public Button hybridMapView;
+	
+	@FXML 
+	public Button previousWaypoint;
+	@FXML
+	public Button nextWaypoint;
 
 	@FXML
 	public Button underlayButton;
@@ -164,6 +179,7 @@ public class GUIController implements Initializable {
 
 		// Bind all the handlers to their corresponding UI elements
 		initializeZoomButtons();
+		initializeSymbolLayerButtons();
 		initializeLayerButton();
 		initializeMenuBar();
 		initializeSymbolRepToolbox();
@@ -201,6 +217,10 @@ public class GUIController implements Initializable {
 		stackPane.widthProperty().addListener(new ResizeListener(swingNode, stackPane));
 
 		swingNodeWorldView.setVisible(false);
+		
+		// bind a context menu to the swing node
+		swingNodeWorldView.setOnContextMenuRequested((event) -> MapViewFunctions.contextMenuRequest(event));
+		
 	}
 
 	/**
@@ -226,9 +246,33 @@ public class GUIController implements Initializable {
 	private void initializeZoomButtons() {
 		zoomIn.setOnAction((event) -> ButtonManager.zoomInAction(event));
 		zoomOut.setOnAction((event) -> ButtonManager.zoomOutAction(event));
+	}
+	
+	
+	/**
+	 * Sets the handlers for the Button that are shown in the symbol layer
+	 */
+	private void initializeSymbolLayerButtons() {
+		
 		centerMap.setOnAction((event) -> ButtonManager.centerMapAction(event));
 		
+		defaultMapView.setOnAction((event) -> ButtonManager.switchToMap("Default"));
+		roadMapView.setOnAction((event) -> ButtonManager.switchToMap("Road"));
+		satelliteMapView.setOnAction((event) -> ButtonManager.switchToMap("Satellite"));
+		hybridMapView.setOnAction((event) -> ButtonManager.switchToMap("Hybrid"));
+		
+		previousWaypoint.setOnAction((event) -> MapViewFunctions.switchToPreviousWaypoint());
+		nextWaypoint.setOnAction((event) -> MapViewFunctions.switchToNextWaypoint());
+		
 		centerMap.setVisible(false);
+		
+		defaultMapView.setVisible(false);
+		roadMapView.setVisible(false);
+		satelliteMapView.setVisible(false);
+		hybridMapView.setVisible(false);
+		
+		previousWaypoint.setVisible(false);
+		nextWaypoint.setVisible(false);
 	}
 
 	/**
@@ -398,6 +442,14 @@ public class GUIController implements Initializable {
 		assert zoomIn != null : "fx:id=\"zoomIn\" was not injected: check your FXML file 'MainWindow.fxml'.";
 		assert zoomOut != null : "fx:id=\"zoomOut\" was not injected: check your FXML file 'MainWindow.fxml'.";
 		assert centerMap != null : "fx:id=\"centerMap\" was not injected: check your FXML file 'MainWindow.fxml'.";
+		
+		assert defaultMapView != null : "fx:id=\"defaultMapView\" was not injected: check your FXML file 'MainWindow.fxml'.";
+		assert roadMapView != null : "fx:id=\"roadMapView\" was not injected: check your FXML file 'MainWindow.fxml'.";
+		assert satelliteMapView != null : "fx:id=\"satelliteMapView\" was not injected: check your FXML file 'MainWindow.fxml'.";
+		assert hybridMapView != null : "fx:id=\"hybridMapView\" was not injected: check your FXML file 'MainWindow.fxml'.";
+		
+		assert previousWaypoint != null : "fx:id=\"previousWaypoint\" was not injected: check your FXML file 'MainWindow.fxml'.";
+		assert nextWaypoint != null : "fx:id=\"nextWaypoint\" was not injected: check your FXML file 'MainWindow.fxml'.";
 
 		assert underlayButton != null : "fx:id=\"underlayButton\" was not injected: check your FXML file 'MainWindow.fxml'.";
 		assert operatorButton != null : "fx:id=\"operatorButton\" was not injected: check your FXML file 'MainWindow.fxml'.";

+ 40 - 23
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/mapView/CustomMapClickListener.java

@@ -4,13 +4,11 @@ import java.awt.geom.Line2D;
 import java.awt.geom.Point2D;
 import java.util.HashSet;
 
-import org.graphstream.algorithm.Toolkit;
 import org.graphstream.graph.Edge;
 import org.jxmapviewer.JXMapViewer;
 import org.jxmapviewer.input.MapClickListener;
 import org.jxmapviewer.viewer.GeoPosition;
 
-import de.tu_darmstadt.informatik.tk.scopviz.debug.Debug;
 import de.tu_darmstadt.informatik.tk.scopviz.main.EdgeSelectionHelper;
 import de.tu_darmstadt.informatik.tk.scopviz.main.Layer;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.GraphDisplayManager;
@@ -60,7 +58,6 @@ public class CustomMapClickListener extends MapClickListener {
 
 		Point2D clickedPoint = CustomMapClickListener.viewer.getTileFactory().geoToPixel(arg0,
 				CustomMapClickListener.viewer.getZoom());
-		Point2D nodePoint;
 
 		// a waypoint was clicked
 		Boolean wayPointSelected = false;
@@ -105,20 +102,14 @@ public class CustomMapClickListener extends MapClickListener {
 
 				wayPointSelected = true;
 
-				PropertiesManager.showNewDataSet(GraphDisplayManager.getGraphManager(Layer.UNDERLAY).getGraph()
-						.getNode(nodeWaypoint.getNodeID()));
-
-				// deselect old waypoint and select new clicked waypoint
-				deselectAll();
-				nodeWaypoint.select();
-				selectedNode = nodeWaypoint;
-				viewer.repaint();
+				selectWaypoint(nodeWaypoint);
 				break;
 			}
 		}
 
 		return wayPointSelected;
 	}
+	
 
 	/**
 	 * check if edge was clicked in symbolLayer
@@ -157,13 +148,14 @@ public class CustomMapClickListener extends MapClickListener {
 			// half pi
 			double HALF_PI = Math.PI / 2;
 
-			// distance of clicked point is in range of edge selection (or is nearer then to previous selected edge)
+			// distance of clicked point is in range of edge selection (or is
+			// nearer then to previous selected edge)
 			if (distanceClickedAndEdge < maxDistance) {
 
 				// distance start point to clicked point
 				double distanceStartToClicked = EdgeSelectionHelper.distance(startPoint.getX(), startPoint.getY(),
 						clickedPoint.getX(), clickedPoint.getY());
-				
+
 				// distance end point to clicked point
 				double distanceEndToClicked = EdgeSelectionHelper.distance(endPoint.getX(), endPoint.getY(),
 						clickedPoint.getX(), clickedPoint.getY());
@@ -177,7 +169,6 @@ public class CustomMapClickListener extends MapClickListener {
 				double alpha = Math.acos((b2 + c2 - a2) / (2 * distanceEndToClicked * distanceBetweenNodes));
 				double beta = Math.acos((a2 + c2 - b2) / (2 * distanceStartToClicked * distanceBetweenNodes));
 
-				
 				// Check if the point is actually visually next to the edge by
 				// checking if both inner angles are less than 90°
 				if (alpha <= HALF_PI && beta <= HALF_PI) {
@@ -189,23 +180,49 @@ public class CustomMapClickListener extends MapClickListener {
 
 		// Clicked point is in range of edge selection
 		if (result != null) {
+			selectEdge(result);
+		}
+	}
 
-			PropertiesManager.showNewDataSet(result);
+	
+	/**
+	 * select the given edge (calls deselctAll() before selecting)
+	 * @param edge
+	 */
+	public static void selectEdge(Edge edge) {
+		
+		PropertiesManager.showNewDataSet(edge);
 
-			deselectAll();
+		deselectAll();
 
-			if (!result.hasAttribute("ui.map.selected"))
-				result.addAttribute("ui.map.selected", true);
-			else
-				result.changeAttribute("ui.map.selected", true);
+		if (!edge.hasAttribute("ui.map.selected"))
+			edge.addAttribute("ui.map.selected", true);
+		else
+			edge.changeAttribute("ui.map.selected", true);
 
-			selectedEdge = result;
+		selectedEdge = edge;
 
-			viewer.repaint();
-		}
+		viewer.repaint();
+	}
+	
 
+	/**
+	 * select the given waypoint (calls deselctAll() before selecting)
+	 * @param nodeWaypoint
+	 */
+	public static void selectWaypoint(CustomWaypoint nodeWaypoint) {
+		
+		PropertiesManager.showNewDataSet(GraphDisplayManager.getGraphManager(Layer.UNDERLAY).getGraph()
+				.getNode(nodeWaypoint.getNodeID()));
+		
+		// deselect old waypoint and select new clicked waypoint
+		deselectAll();
+		nodeWaypoint.select();
+		selectedNode = nodeWaypoint;
+		viewer.repaint();
 	}
 
+	
 	/**
 	 * deselect all edges and the selected node
 	 */

+ 0 - 4
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/mapView/CustomTileFactory.java

@@ -1,7 +1,5 @@
 package de.tu_darmstadt.informatik.tk.scopviz.ui.mapView;
 
-import java.awt.Color;
-import java.awt.Graphics2D;
 import java.awt.image.BufferedImage;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -31,8 +29,6 @@ import org.jxmapviewer.viewer.TileCache;
 import org.jxmapviewer.viewer.TileFactoryInfo;
 import org.jxmapviewer.viewer.util.GeoUtil;
 
-import de.tu_darmstadt.informatik.tk.scopviz.debug.Debug;
-
 /**
  * Custom tile factory for handling connection problems
  * 

+ 0 - 2
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/mapView/CustomWaypointRenderer.java

@@ -11,8 +11,6 @@ import java.awt.image.BufferedImage;
 import org.jxmapviewer.JXMapViewer;
 import org.jxmapviewer.viewer.WaypointRenderer;
 
-import de.tu_darmstadt.informatik.tk.scopviz.debug.Debug;
-
 public class CustomWaypointRenderer implements WaypointRenderer<CustomWaypoint> {
 
 	/**

+ 124 - 4
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/mapView/MapViewFunctions.java

@@ -4,6 +4,7 @@ import java.awt.Color;
 import java.awt.Graphics2D;
 import java.awt.image.BufferedImage;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 
@@ -17,16 +18,22 @@ import org.jxmapviewer.JXMapViewer;
 import org.jxmapviewer.OSMTileFactoryInfo;
 import org.jxmapviewer.VirtualEarthTileFactoryInfo;
 import org.jxmapviewer.painter.Painter;
-import org.jxmapviewer.viewer.DefaultTileFactory;
 import org.jxmapviewer.viewer.GeoPosition;
 import org.jxmapviewer.viewer.TileFactoryInfo;
 import org.jxmapviewer.viewer.WaypointPainter;
 
+import de.tu_darmstadt.informatik.tk.scopviz.debug.Debug;
 import de.tu_darmstadt.informatik.tk.scopviz.graphs.GraphManager;
 import de.tu_darmstadt.informatik.tk.scopviz.main.Layer;
+import de.tu_darmstadt.informatik.tk.scopviz.main.Main;
 import de.tu_darmstadt.informatik.tk.scopviz.main.MainApp;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.GraphDisplayManager;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.PropertiesManager;
+import javafx.beans.binding.Bindings;
+import javafx.scene.control.CheckBox;
+import javafx.scene.control.ContextMenu;
+import javafx.scene.control.MenuItem;
+import javafx.scene.input.ContextMenuEvent;
 
 public final class MapViewFunctions {
 
@@ -37,6 +44,8 @@ public final class MapViewFunctions {
 	 */
 	public static HashMap<String, BufferedImage> imageMap = new HashMap<String, BufferedImage>(
 			WorldView.waypoints.size());
+	
+	private static ArrayList<CustomWaypoint> waypointsAsList = new ArrayList<CustomWaypoint>();
 
 	/**
 	 * private constructor to avoid instantiation
@@ -172,9 +181,11 @@ public final class MapViewFunctions {
 				URL resource = getDeviceTypeURL(deviceType);
 
 				// create a new waypoint with the node information
-				waypoints.add(
-						new CustomWaypoint(node.getAttribute("ui.label"), node.getId(), resource, deviceType, geoPos));
-
+				CustomWaypoint waypoint = new CustomWaypoint(node.getAttribute("ui.label"), node.getId(), resource, deviceType, geoPos);
+				
+				waypoints.add(waypoint);
+						
+				waypointsAsList.add(waypoint);
 			}
 		}
 
@@ -287,4 +298,113 @@ public final class MapViewFunctions {
 		}
 	}
 
+	/**
+	 * Show a ContextMenu when map was right clicked to change symbol layer
+	 * checkbox properties
+	 * 
+	 * @param event
+	 *            contextMenu mouse event
+	 */
+	public static void contextMenuRequest(ContextMenuEvent event) {
+
+		// Declare context menu and items
+		final ContextMenu menu = new ContextMenu();
+		final MenuItem edgeVisible = new MenuItem("Hide Edges");
+		final MenuItem weightVisible = new MenuItem("Hide Weights");
+		final MenuItem labelVisible = new MenuItem("Hide Labels");
+
+		// the checkboxes in dhe symbol layer
+		CheckBox edgeCheckbox = WorldView.controller.edgesVisibleCheckbox;
+		CheckBox weightCheckbox = WorldView.controller.edgeWeightCheckbox;
+		CheckBox labelCheckbox = WorldView.controller.nodeLabelCheckbox;
+
+		// define the actions when clicked on menu item
+		edgeVisible.setOnAction((actionEvent) -> {
+			if (edgeCheckbox.isSelected()) {
+				edgeCheckbox.setSelected(false);
+			} else {
+				edgeCheckbox.setSelected(true);
+			}
+		});
+
+		weightVisible.setOnAction((actionEvent) -> {
+			if (weightCheckbox.isSelected()) {
+				weightCheckbox.setSelected(false);
+			} else {
+				weightCheckbox.setSelected(true);
+			}
+		});
+
+		labelVisible.setOnAction((actionEvent) -> {
+			if (labelCheckbox.isSelected()) {
+				labelCheckbox.setSelected(false);
+			} else {
+				labelCheckbox.setSelected(true);
+			}
+		});
+
+		// bind the text properties to the menu item, so that they change
+		// depending on the selection property
+		edgeVisible.textProperty()
+				.bind(Bindings.when(edgeCheckbox.selectedProperty()).then("Hide Edges").otherwise("Show Edges"));
+
+		weightVisible.textProperty()
+				.bind(Bindings.when(weightCheckbox.selectedProperty()).then("Hide Weights").otherwise("Show Weights"));
+
+		labelVisible.textProperty()
+				.bind(Bindings.when(labelCheckbox.selectedProperty()).then("Hide Labels").otherwise("Show Labels"));
+
+		menu.getItems().addAll(edgeVisible, weightVisible, labelVisible);
+
+		// show context menu at the clicked point
+		menu.show(Main.getInstance().getPrimaryStage(), event.getScreenX(), event.getScreenY());
+
+	}
+
+	/**
+	 * switch to previous Waypoint
+	 */
+	public static void switchToPreviousWaypoint() {
+		
+		CustomWaypoint selectedWaypoint = CustomMapClickListener.selectedNode;
+		
+		if(selectedWaypoint == null && waypointsAsList.size() > 0) {
+			CustomMapClickListener.selectWaypoint(waypointsAsList.get(0));
+			
+		}else {
+			int index = waypointsAsList.indexOf(selectedWaypoint);
+			
+			Debug.out(index);
+			if(index == 0){
+				CustomMapClickListener.selectWaypoint(waypointsAsList.get(waypointsAsList.size() - 1));
+			}else {
+				CustomMapClickListener.selectWaypoint(waypointsAsList.get(index - 1));
+			}
+		}
+	}
+
+	
+	/**
+	 * switch to next Waypoint
+	 */
+	public static void switchToNextWaypoint() {
+		
+		CustomWaypoint selectedWaypoint = CustomMapClickListener.selectedNode;
+		
+		if(selectedWaypoint == null && waypointsAsList.size() > 0) {
+			CustomMapClickListener.selectWaypoint(waypointsAsList.get(0));
+			
+		} else {
+			int index = waypointsAsList.indexOf(selectedWaypoint);
+			
+			Debug.out(index);
+			if(index == waypointsAsList.size() - 1){
+				CustomMapClickListener.selectWaypoint(waypointsAsList.get(0));
+			}else {
+				CustomMapClickListener.selectWaypoint(waypointsAsList.get(index + 1));
+			}
+		}
+		
+	}
+
 }

+ 15 - 17
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/mapView/WorldView.java

@@ -35,7 +35,7 @@ public class WorldView {
 	 * waypointPointer of overlayPainter
 	 */
 	public static WaypointPainter<CustomWaypoint> waypointPainter;
-	
+
 	/*
 	 * mapClickListener, used to only initialize the Listener once
 	 */
@@ -55,14 +55,12 @@ public class WorldView {
 	 * All edges in the WorldView
 	 */
 	public static HashSet<Edge> edges;
-	
+
 	/*
 	 * All painter in symbolLayer stored in a list
 	 */
 	public static List<Painter<JXMapViewer>> painters;
 
-	
-	
 	/**
 	 * private constructor to avoid instantiation
 	 */
@@ -94,31 +92,31 @@ public class WorldView {
 		// Get GeoPositions of nodes and get all waypoints created
 		MapViewFunctions.fetchGraphData(nodePositions, waypoints, edges);
 
-		if(edgePainter == null)
-		// Create a line for all edges
+		if (edgePainter == null)
+			// Create a line for all edges
 			edgePainter = new EdgePainter(edges);
-		
-		if(waypointPainter == null){
+
+		if (waypointPainter == null) {
 			// Create a waypoint painter that takes all the waypoints
 			waypointPainter = new WaypointPainter<CustomWaypoint>();
 			waypointPainter.setWaypoints(waypoints);
 			waypointPainter.setRenderer(new CustomWaypointRenderer());
 		}
-		
-		if(painters == null){
+
+		if (painters == null) {
 			// Create a compound painter that uses all painters
 			painters = new ArrayList<Painter<JXMapViewer>>();
 			painters.add(edgePainter);
 			painters.add(waypointPainter);
 		}
-		
+
 		CompoundPainter<JXMapViewer> painter = new CompoundPainter<JXMapViewer>(painters);
 
 		// Create a TileFactoryInfo for OpenStreetMap
 		TileFactoryInfo info = new OSMTileFactoryInfo();
 
 		CustomTileFactory tileFactory = new CustomTileFactory(info);
-		if(!internMapViewer.getTileFactory().equals(tileFactory)){
+		if (!internMapViewer.getTileFactory().equals(tileFactory)) {
 			internMapViewer.setTileFactory(tileFactory);
 		}
 
@@ -126,13 +124,13 @@ public class WorldView {
 		tileFactory.setThreadPoolSize(8);
 
 		// set Zoom and Center to show all node positions
-		internMapViewer.zoomToBestFit(nodePositions, 0.7);
+		internMapViewer.zoomToBestFit(nodePositions, 1);
 
-		if(internMapViewer.getOverlayPainter() == null){
+		if (internMapViewer.getOverlayPainter() == null) {
 			internMapViewer.setOverlayPainter(painter);
 		}
-		
-		if(mapClickListener == null){
+
+		if (mapClickListener == null) {
 			mapClickListener = new CustomMapClickListener(internMapViewer);
 
 			// "click on waypoints" listener
@@ -140,7 +138,7 @@ public class WorldView {
 		}
 
 		internMapViewer.repaint();
-		
+
 		// try to load OpenStreesMap, when errors occur, throw and handle
 		// Exceptions
 		URL osmWebPage;

+ 6 - 4
scopviz/src/main/resources/MainWindow.fxml

@@ -127,10 +127,12 @@
                                     <Button fx:id="zoomIn" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="+" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="45.0" AnchorPane.rightAnchor="10.0" />
                                     <Button fx:id="zoomOut" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="-" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.rightAnchor="10.0" />
                                     <Button fx:id="centerMap" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="O" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.rightAnchor="45.0" />
-                                    <Button fx:id="centerMap1" layoutX="10.0" layoutY="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="D" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" />
-                                    <Button fx:id="centerMap11" layoutX="20.0" layoutY="20.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="S" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="45.0" />
-                                    <Button fx:id="centerMap111" layoutX="30.0" layoutY="30.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="S" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="80.0" />
-                                    <Button fx:id="centerMap1111" layoutX="40.0" layoutY="40.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="S" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="115.0" />
+                                    <Button fx:id="defaultMapView" layoutX="10.0" layoutY="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="D" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" />
+                                    <Button fx:id="roadMapView" layoutX="20.0" layoutY="20.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="R" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="45.0" />
+                                    <Button fx:id="satelliteMapView" layoutX="30.0" layoutY="30.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="S" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="80.0" />
+                                    <Button fx:id="hybridMapView" layoutX="40.0" layoutY="40.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="H" textAlignment="JUSTIFY" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="115.0" />
+                                    <Button fx:id="nextWaypoint" layoutX="10.0" layoutY="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="&gt;" textAlignment="JUSTIFY" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="10.0" />
+                                    <Button fx:id="previousWaypoint" layoutX="20.0" layoutY="20.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="30.0" prefWidth="30.0" text="&lt;" textAlignment="JUSTIFY" AnchorPane.rightAnchor="45.0" AnchorPane.topAnchor="10.0" />
                                  </children>
                               </AnchorPane>
                             <AnchorPane SplitPane.resizableWithParent="false">