java.lang.Object
com.dlsc.gmapsfx.javascript.JavascriptObject
com.dlsc.gmapsfx.javascript.object.DirectionsPane
public class DirectionsPane extends JavascriptObject
- Author:
- Andre
-
Property Summary
-
Field Summary
Fields Modifier and Type Field Description protected static StringdivArgprotected MapOptionsoptionsFields inherited from class com.dlsc.gmapsfx.javascript.JavascriptObject
jsObject, objectCounter, peerRegistry, runtime, variableName -
Constructor Summary
Constructors Constructor Description DirectionsPane()DirectionsPane(MapOptions mapOptions) -
Method Summary
Modifier and Type Method Description voidaddStateEventHandler(MapStateEventType type, StateEventHandler h)Adds a handler for a state type event on the map.voidaddUIEventHandler(UIEventType type, UIEventHandler h)Adds a handler for a mouse type event on the map.voidaddUIEventHandler(JavascriptObject obj, UIEventType type, UIEventHandler h)Adds a handler for a mouse type event on the map.javafx.beans.property.ReadOnlyObjectProperty<LatLong>centerProperty()voidfitBounds(LatLongBounds bounds)javafx.geometry.Point2DfromLatLngToPoint(LatLong loc)Returns the screen point for the provided LatLong.LatLongBoundsgetBounds()Returns the LatLongBounds of the visual area.LatLonggetCenter()Gets the value of the property center.doublegetHeading()LatLonggetLatLong()ProjectiongetProjection()intgetZoom()Gets the value of the property zoom.voidpanBy(double x, double y)Pans the map by the supplied values.voidremoveMapShape(MapShape shape)voidremoveMarker(Marker marker)voidsetCenter(LatLong latLong)Sets the value of the property center.voidsetHeading(double heading)voidsetMapType(MapTypeIdEnum type)voidsetZoom(int zoom)Sets the value of the property zoom.javafx.beans.property.IntegerPropertyzoomProperty()Methods inherited from class com.dlsc.gmapsfx.javascript.JavascriptObject
checkBoolean, checkInteger, checkUndefined, getJSObject, getNextVariableName, getProperty, getProperty, getVariableName, invokeJavascript, invokeJavascript, invokeJavascriptReturnValue, invokeJavascriptReturnValue, isMemberDefined, setProperty, setProperty, setProperty
-
Property Details
-
zoom
public javafx.beans.property.IntegerProperty zoomProperty- See Also:
getZoom(),setZoom(int)
-
center
- See Also:
getCenter(),setCenter(LatLong)
-
-
Field Details
-
Constructor Details
-
DirectionsPane
public DirectionsPane() -
DirectionsPane
-
-
Method Details
-
setZoom
public void setZoom(int zoom)Sets the value of the property zoom.- Property description:
-
getZoom
public int getZoom()Gets the value of the property zoom.- Property description:
-
zoomProperty
public javafx.beans.property.IntegerProperty zoomProperty()- See Also:
getZoom(),setZoom(int)
-
setCenter
Sets the value of the property center.- Property description:
-
getLatLong
-
fitBounds
-
centerProperty
- See Also:
getCenter(),setCenter(LatLong)
-
getCenter
Gets the value of the property center.- Property description:
-
setHeading
public void setHeading(double heading) -
getHeading
public double getHeading() -
removeMarker
-
setMapType
-
removeMapShape
-
getProjection
-
getBounds
Returns the LatLongBounds of the visual area. Note: on zoom changes the bounds are reset after the zoom event is fired, which can cause unexpected results.- Returns:
-
fromLatLngToPoint
Returns the screen point for the provided LatLong. Note: Unexpected results can be obtained if this method is called as a result of a zoom change, as the zoom event is fired before the bounds are updated, and bounds need to be used to obtain the answer!One workaround is to only operate off bounds_changed events.
- Parameters:
loc-- Returns:
-
panBy
public void panBy(double x, double y)Pans the map by the supplied values.- Parameters:
x- delta x value in pixels.y- delta y value in pixels.
-
addUIEventHandler
Adds a handler for a mouse type event on the map.- Parameters:
type- Type of the event to register against.h- Handler that will be called when the event occurs.
-
addUIEventHandler
Adds a handler for a mouse type event on the map.- Parameters:
obj- The object that the event should be registered on.type- Type of the event to register against.h- Handler that will be called when the event occurs.
-
addStateEventHandler
Adds a handler for a state type event on the map.We could allow this to handle any state event by adding a parameter JavascriptObject obj, but we would then need to loosen up the event type and either accept a String value, or fill an enum with all potential state events.
- Parameters:
type- Type of the event to register against.h- Handler that will be called when the event occurs.
-