Skip to content

Latest commit

 

History

History
134 lines (68 loc) · 3.36 KB

DirectionsRenderer.md

File metadata and controls

134 lines (68 loc) · 3.36 KB

See html formatted version

DirectionsRenderer class

google.maps.DirectionsRenderer class

Renders directions obtained from the DirectionsService.

This class extends MVCObject.

Constructor

undefined

DirectionsRenderer([opts])

Parameters: 

Creates the renderer with the given options. Directions can be rendered on a map (as visual overlays) or additionally on a

panel (as textual instructions).

Methods

undefined

getDirections()

Parameters:  None

Return Value:  DirectionsResult

Returns the renderer's current set of directions.

undefined

getMap()

Parameters:  None

Return Value:  Map

Returns the map on which the DirectionsResult is rendered.

undefined

getPanel()

Parameters:  None

Return Value:  Node

Returns the panel

in which the DirectionsResult is rendered.

undefined

getRouteIndex()

Parameters:  None

Return Value:  number

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

undefined

setDirections(directions)

Parameters: 

Return Value:  None

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.

undefined

setMap(map)

Parameters: 

Return Value:  None

This method specifies the map on which directions will be rendered. Pass null to remove the directions from the map.

undefined

setOptions(options)

Parameters: 

Return Value:  None

Change the options settings of this DirectionsRenderer after initialization.

undefined

setPanel(panel)

Parameters: 

  • panel:  Node

Return Value:  None

This method renders the directions in a

. Pass null to remove the content from the panel.

undefined

setRouteIndex(routeIndex)

Parameters: 

  • routeIndex:  number

Return Value:  None

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.

Events

undefined

function()

Arguments:  None

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.