Follow us on GitHub

com.google.gwt.maps.client.services
Class DirectionsRenderer

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.mvc.MVCObject<DirectionsRenderer>
          extended by com.google.gwt.maps.client.services.DirectionsRenderer

public class DirectionsRenderer
extends MVCObject<DirectionsRenderer>

Renders directions retrieved in the form of a DirectionsResult object retrieved from the DirectionsService. This class extends MVCObject.

See DirectionsRenderer API Doc


Constructor Summary
protected DirectionsRenderer()
          use newInstance();
 
Method Summary
 HandlerRegistration addDirectionsChangeHandler(DirectionsChangeMapHandler handler)
          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.
 DirectionsResult getDirections()
          Returns the renderer's current set of directions.
 MapWidget getMap()
          Returns the map on which the DirectionsResult is rendered.
 Element getPanel()
          Returns the panel <div> in which the DirectionsResult is rendered.
 int getRouteIndex()
          Returns the current (zero-based) route index in use by this DirectionsRenderer object.
static DirectionsRenderer newInstance(DirectionsRendererOptions options)
          Renders directions retrieved in the form of a DirectionsResult object retrieved from the DirectionsService.
 void setDirections(DirectionsResult directions)
          Set the renderer to use the result from the DirectionsService.
 void setMap(MapWidget mapWidget)
          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(Element element)
          This method renders the directions in a <div>.
 void setRouteIndex(int routeIndex)
          Set the (zero-based) index of the route in the DirectionsResult object to render.
 
Methods inherited from class com.google.gwt.maps.client.mvc.MVCObject
bindTo, bindTo, bindTo, changed, createInstanceOfMVCObject, get, notify, set, setValues, unbind, unbindAll
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectionsRenderer

protected DirectionsRenderer()
use newInstance();

Method Detail

newInstance

public static final DirectionsRenderer newInstance(DirectionsRendererOptions options)
Renders directions retrieved in the form of a DirectionsResult object retrieved from the DirectionsService. This class extends MVCObject.

Parameters:
options -

getDirections

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


setMap

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

Parameters:
mapWidget -

getMap

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


getPanel

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


getRouteIndex

public final int 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.

Parameters:
directions -

setOptions

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

Parameters:
options -

setPanel

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

Parameters:
element -

setRouteIndex

public final void setRouteIndex(int 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.

Parameters:
routeIndex -

addDirectionsChangeHandler

public final HandlerRegistration addDirectionsChangeHandler(DirectionsChangeMapHandler handler)
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.

Parameters:
handler -


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.