Package NTNU.IDATT1002.controllers
Class Map
java.lang.Object
NTNU.IDATT1002.controllers.NavBarController
NTNU.IDATT1002.controllers.Map
- All Implemented Interfaces:
com.lynden.gmapsfx.MapComponentInitializedListener,javafx.fxml.Initializable
public class Map extends NavBarController implements javafx.fxml.Initializable, com.lynden.gmapsfx.MapComponentInitializedListener
Controls the buttons and changeable elements on map.fxml,
a page where you can find images by location
- Version:
- 1.0 22.03.2020
-
Field Summary
Fields Modifier and Type Field Description javafx.scene.control.TextFieldsearchjavafx.scene.control.ButtonsearchBtnFields inherited from class NTNU.IDATT1002.controllers.NavBarController
navBarAlbums, navBarExplore, navBarLogo, navBarLogOut, navBarMap, navBarSearch, navBarSearchBtn, navBarUpload, returnButton -
Constructor Summary
Constructors Constructor Description Map()TellDataExchangethat map page is visited. -
Method Summary
Modifier and Type Method Description voiddoBeforePageExit()Close outgoing requests when exiting the page.voidinitialize(java.net.URL url, java.util.ResourceBundle rb)InitializeGoogleMapViewandGeoApiContextwith required API key.voidmapInitialized()Create map an fetch images from the appropriate task and add individual markers for images.voidqueryAutocomplete(javafx.scene.input.KeyEvent keyEvent)Query for autocomplete predictions and bind them to the corresponding text field.voidsearchGeocodingAddress(javafx.event.ActionEvent event)Search a Geocoding address with the current input in the address search text field.Methods inherited from class NTNU.IDATT1002.controllers.NavBarController
enterSearch, goToPrevious, logOut, search, switchToAlbums, switchToExplore, switchToMain, switchToMap, switchToSearch, switchToUpload
-
Field Details
-
Constructor Details
-
Map
public Map()TellDataExchangethat map page is visited.
-
-
Method Details
-
doBeforePageExit
public void doBeforePageExit()Close outgoing requests when exiting the page.- Overrides:
doBeforePageExitin classNavBarController
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle rb)InitializeGoogleMapViewandGeoApiContextwith required API key. Also add listener for map initialization and bind the address text field to aSimpleStringProperty.- Specified by:
initializein interfacejavafx.fxml.Initializable- Parameters:
url-rb-
-
mapInitialized
public void mapInitialized()Create map an fetch images from the appropriate task and add individual markers for images.- Specified by:
mapInitializedin interfacecom.lynden.gmapsfx.MapComponentInitializedListener
-
queryAutocomplete
public void queryAutocomplete(javafx.scene.input.KeyEvent keyEvent)Query for autocomplete predictions and bind them to the corresponding text field.- Parameters:
keyEvent-
-
searchGeocodingAddress
public void searchGeocodingAddress(javafx.event.ActionEvent event)Search a Geocoding address with the current input in the address search text field. Centers the map on the first result.- Parameters:
event-
-