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.TextField
search
javafx.scene.control.Button
searchBtn
Fields inherited from class NTNU.IDATT1002.controllers.NavBarController
navBarAlbums, navBarExplore, navBarLogo, navBarLogOut, navBarMap, navBarSearch, navBarSearchBtn, navBarUpload, returnButton
-
Constructor Summary
Constructors Constructor Description Map()
TellDataExchange
that map page is visited. -
Method Summary
Modifier and Type Method Description void
doBeforePageExit()
Close outgoing requests when exiting the page.void
initialize(java.net.URL url, java.util.ResourceBundle rb)
InitializeGoogleMapView
andGeoApiContext
with required API key.void
mapInitialized()
Create map an fetch images from the appropriate task and add individual markers for images.void
queryAutocomplete(javafx.scene.input.KeyEvent keyEvent)
Query for autocomplete predictions and bind them to the corresponding text field.void
searchGeocodingAddress(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()TellDataExchange
that map page is visited.
-
-
Method Details
-
doBeforePageExit
public void doBeforePageExit()Close outgoing requests when exiting the page.- Overrides:
doBeforePageExit
in classNavBarController
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle rb)InitializeGoogleMapView
andGeoApiContext
with required API key. Also add listener for map initialization and bind the address text field to aSimpleStringProperty
.- Specified by:
initialize
in 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:
mapInitialized
in 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
-
-