Options
All
  • Public
  • Public/Protected
  • All
Menu

Renders directions obtained from the DirectionsService.

Hierarchy

Index

Constructors

constructor

Methods

addListener

  • Adds the given listener function to the given event name. Returns an identifier for this listener that can be used with google.maps.event.removeListener.

    Parameters

    • eventName: string
    • handler: Function

    Returns MapsEventListener

bindTo

  • bindTo(key: string, target: MVCObject, targetKey?: null | string, noNotify?: boolean): void
  • Binds a View to a Model.

    Parameters

    • key: string
    • target: MVCObject
    • Optional targetKey: null | string
    • Optional noNotify: boolean

    Returns void

get

  • get(key: string): any
  • Gets a value.

    Parameters

    • key: string

    Returns any

getDirections

  • Returns the renderer's current set of directions.

    Returns null | DirectionsResult

getMap

  • getMap(): null | Map
  • Returns the map on which the DirectionsResult is rendered.

    Returns null | Map

getPanel

  • getPanel(): null | Node
  • Returns the panel <div> in which the DirectionsResult is rendered.

    Returns null | Node

getRouteIndex

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

    Returns number

notify

  • notify(key: string): void
  • Notify all observers of a change on this property. This notifies both objects that are bound to the object's property as well as the object that it is bound to.

    Parameters

    • key: string

    Returns void

set

  • set(key: string, value: any): void
  • Sets a value.

    Parameters

    • key: string
    • value: any

    Returns void

setDirections

  • 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

    Returns void

setMap

  • setMap(map: null | Map): void
  • This method specifies the map on which directions will be rendered. Pass null to remove the directions from the map.

    Parameters

    • map: null | Map

    Returns void

setOptions

  • Change the options settings of this DirectionsRenderer after initialization.

    Parameters

    Returns void

setPanel

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

    Parameters

    • panel: null | Node

    Returns void

setRouteIndex

  • setRouteIndex(routeIndex: number): void
  • 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: number

    Returns void

setValues

  • setValues(values?: null | object): void
  • Sets a collection of key-value pairs.

    Parameters

    • Optional values: null | object

    Returns void

unbind

  • unbind(key: string): void
  • Removes a binding. Unbinding will set the unbound property to the current value. The object will not be notified, as the value has not changed.

    Parameters

    • key: string

    Returns void

unbindAll

  • unbindAll(): void

Generated using TypeDoc