public class DirectionsRenderer extends MVCObject<DirectionsRenderer>
Modifier | Constructor and Description |
---|---|
protected |
DirectionsRenderer()
use newInstance();
|
Modifier and Type | Method and Description |
---|---|
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.
|
bindTo, bindTo, bindTo, changed, createInstanceOfMVCObject, get, notify, set, setValues, unbind, unbindAll
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
public static final DirectionsRenderer newInstance(DirectionsRendererOptions options)
options
- public final DirectionsResult getDirections()
public final void setMap(MapWidget mapWidget)
mapWidget
- public final MapWidget getMap()
public final Element getPanel()
<div>
in which the DirectionsResult
is rendered.public final int getRouteIndex()
public final void setDirections(DirectionsResult directions)
directions
- public final void setOptions(DirectionsRendererOptions options)
options
- public final void setPanel(Element element)
<div>
. Pass
null to remove the content from the panel.element
- public final void setRouteIndex(int routeIndex)
routeIndex
- public final HandlerRegistration addDirectionsChangeHandler(DirectionsChangeMapHandler handler)
handler
- Copyright © 2011-2013 Gone Vertical LLC. All Rights Reserved.