Fork me on GitHub
Show:

RouteBuilder

Summary

Central Route component interface for an application layer.

Provides interface to route commands and binds route events to RouteRenderer

Constructor

aeris.maps.gmaps.route.RouteBuilder

Syntax

aeris.maps.gmaps.route.RouteBuilder

(
  • opt_options
)

Summary

Parameters:

Methods

addWaypoint

Syntax

addWaypoint

(
  • waypoint
  • opt_options
)
Promise

Summary

Add a waypoint to the route.

Parameters:

Returns:

Promise:

A promise to add the waypoint.

addWaypointAt

Syntax

addWaypointAt

(
  • waypoint
  • atIndex
)
Promise

Summary

Insert a waypoint into to the route at a specified index.

Parameters:

Returns:

Promise:

A promise to add the waypoint.

appendReverseRoute

Syntax

appendReverseRoute

() Promise

Summary

Returns:

Promise:

Promise to execute command.

canRedo

Syntax

canRedo

() Boolean

Summary

Returns:

Boolean:

. Whether redo is an available action.

canUndo

Syntax

canUndo

() Boolean

Summary

Returns:

Boolean:

. Whether undo is an available action.

delegateRouteEvents

Syntax

delegateRouteEvents

(
  • opt_events
  • opt_ctx
)

Summary

Delegates events to this.route_.

Parameters:

  • opt_events Object=

    Defaults to this.routeEvents. eg { 'click': this.handleClick }.

  • opt_ctx Object

    Context in which to invoke event handlers.

eraseWaypoint_

Syntax

eraseWaypoint_

(
  • waypoint
  • indexOfWaypointInRoute
)
private

Summary

Remove a waypoint view from the map.

Parameters:

executeCommand_

Syntax

executeCommand_

(
  • command
)
Promise private

Summary

Parameters:

Returns:

getRoute

Syntax

getRoute

() Route

Summary

Returns:

moveWaypoint

Syntax

moveWaypoint

(
  • waypoint
  • latLon
)
Promise

Summary

Change the position of a waypoint.

Parameters:

Returns:

redo

Syntax

redo

() Promise

Summary

Redo the last executed command.

Returns:

Promise:

Promise to redo command.

redrawRoute_

Syntax

redrawRoute_

(
  • waypoints
)
private

Summary

Parameters:

removeWaypoint

Syntax

removeWaypoint

(
  • waypoint
)
Promise

Summary

Parameters:

Returns:

Promise:

A promise to remove the waypoint.

renderWaypoint_

Syntax

renderWaypoint_

(
  • waypoint
)
private

Summary

Render a waypoint.

Parameters:

resetRoute

Syntax

resetRoute

(
  • opt_waypoints
)
Promise

Summary

Reset all waypoints in a route.

Parameters:

  • opt_waypoints Array.<Waypoint>=

    If not set, will clear all waypoints in the route.

Returns:

Promise:

A promise to reset the route.

routeToJSON

Syntax

routeToJSON

() Object

Summary

Returns:

setMap

Syntax

setMap

(
  • map
)

Summary

Parameters:

setRoute

Syntax

setRoute

(
  • route
)

Summary

Parameters:

styleRoute

Syntax

styleRoute

(
  • styles
)

Summary

Parameters:

undelegateEvents

Syntax

undelegateEvents

()

Summary

Undelegate all events bound by this RouteBuilder.

undelegateRouteEvents

Syntax

undelegateRouteEvents

()

Summary

Undelegate events bound to this.route_

undo

Syntax

undo

() Promise

Summary

Undo the last executed command

Returns:

Promise:

Promise to undo command.

Properties

AddWaypointCommand_

Syntax

AddWaypointCommand_

Function Constructor. private

Summary

AppendReverseRouteCommand_

Syntax

AppendReverseRouteCommand_

Function Constructor. private

Summary

commandManager_

Syntax

commandManager_

Boolean

Summary

followDirections

Syntax

followDirections

Boolean

Summary

Whether added waypoints should follow directions.

MoveWaypointCommand_

Syntax

MoveWaypointCommand_

Function Constructor. private

Summary

RemoveWaypointCommand_

Syntax

RemoveWaypointCommand_

Function Constructor. private

Summary

ResetRouteCommand_

Syntax

ResetRouteCommand_

Function Constructor. private

Summary

route_

Syntax

Summary

The Route being built.

routeEvents_

Syntax

routeEvents_

Object private

Summary

Hash of event listeners bound to the {aeris.maps.gmaps.route.Route}

routeRenderer_

Syntax

routeRenderer_

aeris.maps.gmaps.route.RouteRenderer private

Summary

The {aeris.maps.gmaps.route.RouteRenderer} used by the builder to render route view elements.

travelMode

Syntax

travelMode

aeris.maps.gmaps.route.Waypoint.travelMode

Summary

Travel mode to set on new waypoints.

Events

command

Syntax

command

Summary

A command has been executed, undone, or redone.

command:execute

Syntax

command:execute

Summary

command:redo

Syntax

command:redo

Summary

command:undo

Syntax

command:undo

Summary

path:click

Syntax

path:click

Summary

Event Payload:

waypoint:click

Syntax

waypoint:click

Summary

Event Payload:

waypoint:dragend

Syntax

waypoint:dragend

Summary

Event Payload: