Top Description Fields Constructors Methods
com.dlsc.gmapsfx

public Class MainApp2

extends Application
implements MapComponentInitializedListener, ElevationServiceCallback, GeocodingServiceCallback, DirectionsServiceCallback
Class Inheritance
All Implemented Interfaces
com.dlsc.gmapsfx.service.directions.DirectionsServiceCallback, com.dlsc.gmapsfx.service.geocoding.GeocodingServiceCallback, com.dlsc.gmapsfx.service.elevation.ElevationServiceCallback, com.dlsc.gmapsfx.MapComponentInitializedListener
Imports
com.dlsc.gmapsfx.javascript.object.DirectionsPane, .GoogleMap, .LatLong, .MapOptions, .MapTypeIdEnum, .Marker, .MarkerOptions, com.dlsc.gmapsfx.service.directions.DirectionStatus, .DirectionsRenderer, .DirectionsResult, .DirectionsServiceCallback, com.dlsc.gmapsfx.service.elevation.ElevationResult, .ElevationServiceCallback, .ElevationStatus, com.dlsc.gmapsfx.service.geocoding.GeocoderStatus, .GeocodingResult, .GeocodingService, .GeocodingServiceCallback, javafx.application.Application, .Platform, javafx.scene.Scene, javafx.scene.control.Button, .ComboBox, .Label, javafx.scene.layout.BorderPane, javafx.scene.web.WebEvent, javafx.stage.Stage

Example Application for creating and loading a GoogleMap into a JavaFX application
Author
Rob Terpilowski

Field Summary

Modifier and TypeField and Description
private Button
private Button
private Button
private Button
protected DirectionsPane
private Label
private Label
private Label
protected GoogleMap
protected GoogleMapView
private ComboBox<MapTypeIdEnum>
private MarkerOptions
private Marker
pack-priv DirectionsRenderer
Inherited from javafx.application.Application:
STYLESHEET_CASPIANSTYLESHEET_MODENA

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private void
public void
public void
public void
private void
public static void
main(String[]
the command line arguments
args
)

The main() method is ignored in correctly deployed JavaFX application.

public void
public void
start(final Stage
the primary stage for this application, onto which the application scene can be set. Applications may create other stages, if needed, but they will not be primary stages.
stage
)

Implements abstract javafx.application.Application.start.

The main entry point for all JavaFX applications.

Inherited from javafx.application.Application:
getHostServicesgetParametersgetUserAgentStylesheetinitlaunchlaunchnotifyPreloadersetUserAgentStylesheetstop

Field Detail

btnDeleteMarkerback to summary
private Button btnDeleteMarker
btnHideMarkerback to summary
private Button btnHideMarker
btnZoomInback to summary
private Button btnZoomIn
btnZoomOutback to summary
private Button btnZoomOut
directionsback to summary
protected DirectionsPane directions
lblCenterback to summary
private Label lblCenter
lblClickback to summary
private Label lblClick
lblZoomback to summary
private Label lblZoom
mapback to summary
protected GoogleMap map
mapComponentback to summary
protected GoogleMapView mapComponent
mapTypeComboback to summary
private ComboBox<MapTypeIdEnum> mapTypeCombo
markerOptions2back to summary
private MarkerOptions markerOptions2
myMarker2back to summary
private Marker myMarker2
rendererback to summary
pack-priv DirectionsRenderer renderer

Constructor Detail

MainApp2back to summary
public MainApp2()

Method Detail

checkCenterback to summary
private void checkCenter(LatLong center)
deleteMarkerback to summary
private void deleteMarker()
directionsReceivedback to summary
public void directionsReceived(DirectionsResult results, DirectionStatus status)

Implements com.dlsc.gmapsfx.service.directions.DirectionsServiceCallback.directionsReceived.

Annotations
@Override
elevationsReceivedback to summary
public void elevationsReceived(ElevationResult[] results, ElevationStatus status)

Implements com.dlsc.gmapsfx.service.elevation.ElevationServiceCallback.elevationsReceived.

Annotations
@Override
geocodedResultsReceivedback to summary
public void geocodedResultsReceived(GeocodingResult[] results, GeocoderStatus status)

Implements com.dlsc.gmapsfx.service.geocoding.GeocodingServiceCallback.geocodedResultsReceived.

Annotations
@Override
hideMarkerback to summary
private void hideMarker()
mainback to summary
public static void main(String[] args)

The main() method is ignored in correctly deployed JavaFX application. main() serves only as fallback in case the application can not be launched through deployment artifacts, e.g., in IDEs with limited FX support. NetBeans ignores main().

Parameters
args:String[]

the command line arguments

mapInitializedback to summary
public void mapInitialized()

Implements com.dlsc.gmapsfx.MapComponentInitializedListener.mapInitialized.

Annotations
@Override
startback to summary
public void start(final Stage stage) throws Exception

Implements abstract javafx.application.Application.start.

Doc from javafx.application.Application.start.

The main entry point for all JavaFX applications. The start method is called after the init method has returned, and after the system is ready for the application to begin running.

Note

This method is called on the JavaFX Application Thread.

Parameters
stage:Stage

the primary stage for this application, onto which the application scene can be set. Applications may create other stages, if needed, but they will not be primary stages.

Annotations
@Override
Exceptions
Exception:
if something goes wrong