Angular controller

controller source

Methods

clearAll

Clear all waypoints from service and layer

formatDistance (wp)

Format waypoint route distance in a human friendly way

Parameters

NameTypeDescription
wp float

Wayoint

removeRoutesForWaypoint (wp)

(PRIVATE) Remove routes from selected waypoint

Parameters

NameTypeDescription
wp object

Waypoint to remove routes

routeAdded (feature)

Handler of adding computed route to layer

Parameters

NameTypeDescription
feature GeoJSON

Route to add

routeRemoved (feature)

Remove selected route from source

Parameters

NameTypeDescription
feature object

Route feature to remove

toggleEdit (waypoint, e)

Remove selected waypoint from source

Parameters

NameTypeDescription
waypoint object
e unknown

totalDistance

Get the total distance for all waypoint routes

waypointAdded (wp)

Handler of adding waypoint in connected service

Parameters

NameTypeDescription
wp object

Waypoint ojbect, with lat, lon and routes array

waypointRemoved (wp)

Remove selected waypoint from source

Parameters

NameTypeDescription
wp object

Waypoint feature to remove