Fork me on GitHub
Show:

RouteReverser

Summary

Helper class for reversing the order of waypoints in a route.

Constructor

aeris.maps.gmaps.route.commands.helpers.RouteReverser

Syntax

aeris.maps.gmaps.route.commands.helpers.RouteReverser

(
  • route
)

Summary

Parameters:

Methods

cloneWaypointWithAttributes_

Syntax

cloneWaypointWithAttributes_

(
  • waypoint
  • attrs
  • opt_shouldValidate
)
Waypoint private

Summary

Create a copy of a waypoint, with the specified attributes.

Parameters:

Returns:

ensureRouteHasWaypoint_

Syntax

ensureRouteHasWaypoint_

(
  • waypoint
)
private

Summary

Parameters:

getLastOrOnlyWaypointInReverse_

Syntax

getLastOrOnlyWaypointInReverse_

(
  • waypoint
)
Waypoint private

Summary

Consider:

FIRST --- MIDDLE --- LAST (forward) LAST --- MIDDLE --- FIRST (reverse)

The LAST waypoint, when reversed, has no path preceding it.

Parameters:

Returns:

getMiddleOrFirstWaypointInReverse_

Syntax

getMiddleOrFirstWaypointInReverse_

(
  • waypoint
)
Waypoint private

Summary

Consider:

FIRST MIDDLE >>> LAST (forward) LAST >>> MIDDLE FIRST (reverse)

The path preceding MIDDLE changes to the path which originally preceded LAST

Parameters:

Returns:

getPathDescribingAttributesFrom_

Syntax

getPathDescribingAttributesFrom_

(
  • waypoint
)
Object private

Summary

Parameters:

Returns:

Object:

Path attribute, and attributes which describe the path.

getRouteWaypointsInReverse

Syntax

getRouteWaypointsInReverse

() Array.<Waypoint>

Summary

Returns:

getWaypointInReverse

Syntax

getWaypointInReverse

(
  • waypoint
)
Waypoint

Summary

A waypoint describes attributes of the path which precedes it. So when a waypoint's route changes directionality, that waypoint need to change which path it's describing.

Parameters:

Returns:

Waypoint:

A waypoint with reverse directionality.

getWaypointPathInReverse

Syntax

getWaypointPathInReverse

(
  • waypoint
)
Path

Summary

Parameters:

Returns:

Path:

Array of lat/lon coordinates.

Properties