Fork me on GitHub
Show:

ResetRouteCommand

Summary

Replaces all waypoints in a route with new ones.

Constructor

aeris.maps.gmaps.route.commands.ResetRouteCommand

Syntax

aeris.maps.gmaps.route.commands.ResetRouteCommand

(
  • opt_waypoints
  • opt_refresh
)

Summary

Parameters:

  • opt_waypoints Array<Waypoint>=

    New Waypoints to add to the route.

  • opt_refresh Boolean=

    Set to true to recalculate the provided waypoints' path and distance data.

Methods

execute_

Syntax

execute_

()

Summary

execute_

Syntax

execute_

()

Summary

undo_

Syntax

undo_

()

Summary

validateRoute_

Syntax

validateRoute_

(
  • route
)
private

Summary

Parameters:

Properties

index_

Syntax

index_

Number private

Summary

Index of the removed waypoint. Saved so that we can undo, and put it back in the right place.

newLatLon_

Syntax

newLatLon_

Array. private

Summary

The latLon to move to.

originalLatLon_

Syntax

originalLatLon_

Array. private

Summary

The original latLon of the waypoint, for purposes of undoing.

route_

Syntax

route_

aeris.maps.gmaps.route.Route protected

Summary

The Route the Waypoint will be added to.

waypoint_

Syntax

Summary

The waypoint we're moving.

waypoint_

Syntax

Summary

The Waypoint being added to the Route.