Class DirectionsPane

java.lang.Object
com.dlsc.gmapsfx.javascript.JavascriptObject
com.dlsc.gmapsfx.javascript.object.DirectionsPane

public class DirectionsPane
extends JavascriptObject
Author:
Andre
  • Property Details

  • Field Details

  • Constructor Details

  • 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

      public void setCenter​(LatLong latLong)
      Sets the value of the property center.
      Property description:
    • getLatLong

      public LatLong getLatLong()
    • fitBounds

      public void fitBounds​(LatLongBounds bounds)
    • centerProperty

      public final javafx.beans.property.ReadOnlyObjectProperty<LatLong> centerProperty()
      See Also:
      getCenter(), setCenter(LatLong)
    • getCenter

      public LatLong getCenter()
      Gets the value of the property center.
      Property description:
    • setHeading

      public void setHeading​(double heading)
    • getHeading

      public double getHeading()
    • removeMarker

      public void removeMarker​(Marker marker)
    • setMapType

      public void setMapType​(MapTypeIdEnum type)
    • removeMapShape

      public void removeMapShape​(MapShape shape)
    • getProjection

      public Projection getProjection()
    • getBounds

      public LatLongBounds 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

      public javafx.geometry.Point2D fromLatLngToPoint​(LatLong loc)
      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

      public void addUIEventHandler​(UIEventType type, UIEventHandler h)
      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

      public void addUIEventHandler​(JavascriptObject obj, UIEventType type, UIEventHandler h)
      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

      public void addStateEventHandler​(MapStateEventType type, StateEventHandler h)
      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.