com.google.maps.gwt.client
Class DirectionsRenderer

java.lang.Object
  extended by JavaScriptObject
      extended by com.google.maps.gwt.client.MVCObject
          extended by com.google.maps.gwt.client.DirectionsRenderer

public class DirectionsRenderer
extends MVCObject

Renders directions retrieved in the form of a DirectionsResult object retrieved from the DirectionsService . THIS SOURCE CODE IS GENERATED, DO NOT MODIFY


Nested Class Summary
static interface DirectionsRenderer.DirectionsChangedHandler
          This event is fired when the rendered directions change, either when a new DirectionsResult is set or when the user finishes dragging a change to the directions path.
 
Constructor Summary
protected DirectionsRenderer()
          Protected constructor avoids default public constructor.
 
Method Summary
 void addDirectionsChangedListener(DirectionsRenderer.DirectionsChangedHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addDirectionsChangedListenerOnce(DirectionsRenderer.DirectionsChangedHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void clearDirectionsChangedListeners()
          Removes all listeners for the given event for the given instance.
 void clearInstanceListeners()
          Removes all listeners for all events for the given instance.
static DirectionsRenderer create()
          Creates the renderer with the given options.
static DirectionsRenderer create(DirectionsRendererOptions opts)
          Creates the renderer with the given options.
 DirectionsResult getDirections()
          Returns the renderer's current set of directions.
 GoogleMap getMap()
          Returns the map on which the DirectionsResult is rendered.
 Node getPanel()
          Returns the panel <div> in which the DirectionsResult is rendered.
 double getRouteIndex()
          Returns the current (zero-based) route index in use by this DirectionsRenderer object.
 void setDirections(DirectionsResult directions)
          Set the renderer to use the result from the DirectionsService .
 void setMap(GoogleMap map)
          This method specifies the map on which directions will be rendered.
 void setOptions(DirectionsRendererOptions options)
          Change the options settings of this DirectionsRenderer after initialization.
 void setPanel(Node panel)
          This method renders the directions in a <div> .
 void setRouteIndex(double routeIndex)
          Set the (zero-based) index of the route in the DirectionsResult object to render.
 void triggerDirectionsChanged(JavaScriptObject... varargs)
          Triggers the given event.
 
Methods inherited from class com.google.maps.gwt.client.MVCObject
bindTo, bindTo, bindTo, bindTo, changed, get, notify, set, setValues, setValues, unbind, unbindAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectionsRenderer

protected DirectionsRenderer()
Protected constructor avoids default public constructor.

Method Detail

create

public static DirectionsRenderer create(DirectionsRendererOptions opts)
Creates the renderer with the given options. Directions can be rendered on a map (as visual overlays) or additionally on a <div> panel (as textual instructions).


create

public static DirectionsRenderer create()
Creates the renderer with the given options. Directions can be rendered on a map (as visual overlays) or additionally on a <div> panel (as textual instructions).


addDirectionsChangedListener

public final void addDirectionsChangedListener(DirectionsRenderer.DirectionsChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addDirectionsChangedListenerOnce

public final void addDirectionsChangedListenerOnce(DirectionsRenderer.DirectionsChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event.


clearDirectionsChangedListeners

public final void clearDirectionsChangedListeners()
Removes all listeners for the given event for the given instance.


clearInstanceListeners

public final void clearInstanceListeners()
Removes all listeners for all events for the given instance.


getDirections

public final DirectionsResult getDirections()
Returns the renderer's current set of directions.


getMap

public final GoogleMap getMap()
Returns the map on which the DirectionsResult is rendered.


getPanel

public final Node getPanel()
Returns the panel <div> in which the DirectionsResult is rendered.


getRouteIndex

public final double getRouteIndex()
Returns the current (zero-based) route index in use by this DirectionsRenderer object.


setDirections

public final void setDirections(DirectionsResult directions)
Set the renderer to use the result from the DirectionsService . Setting a valid set of directions in this manner will display the directions on the renderer's designated map and panel.


setMap

public final void setMap(GoogleMap map)
This method specifies the map on which directions will be rendered. Pass null to remove the directions from the map.


setOptions

public final void setOptions(DirectionsRendererOptions options)
Change the options settings of this DirectionsRenderer after initialization.


setPanel

public final void setPanel(Node panel)
This method renders the directions in a <div> . Pass null to remove the content from the panel.


setRouteIndex

public final void setRouteIndex(double routeIndex)
Set the (zero-based) index of the route in the DirectionsResult object to render. By default, the first route in the array will be rendered.


triggerDirectionsChanged

public final void triggerDirectionsChanged(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.