Class RouteHTMLViewsFactory

This class creates HTMLElements for routes

Source : file viewsFactories/RouteHTMLViewsFactory.js at line 42

Constructor

new RouteHTMLViewsFactory ( )

The constructor

Source : file viewsFactories/RouteHTMLViewsFactory.js at line 157

Public methods

getRouteFooterHTML ( classPrefix, route )

Gives an HTMLElement with the provider and transit mode used for the itinerary creation

Source : file viewsFactories/RouteHTMLViewsFactory.js at line 346

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElements

route Route

The route for witch the HTMLElement will be created

Returns

An HTMLElement with the Route footer
Type : HTMLElement

getRouteHeaderHTML ( classPrefix, route )

Gives an HTMLElement with a route name, route distance, route duration ( except for bike), route ascent (if any) and route descent (if any)

Source : file viewsFactories/RouteHTMLViewsFactory.js at line 254

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElements

route Route

The route for witch the HTMLElement will be created

Returns

An HTMLElement with the Route header
Type : HTMLElement

getRouteManeuversAndNotesHTML ( classPrefix, route, addDataset )

Gives an HTMLElement with all the notes and maneuvers linked to a route, ordered by distance since the beginning of the route

Source : file viewsFactories/RouteHTMLViewsFactory.js at line 184

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElements

route Route

The route for witch the HTMLElement will be created

addDataset Boolean

When true, objId and objType are added to the dataset of the HTMLElement

Returns

An HTMLElement with all the notes and maneuvers linked to the route
Type : HTMLElement

getRouteProfileHTML ( classPrefix, route )

Gives an HTMLElement with the SVG profile of a route

Source : file viewsFactories/RouteHTMLViewsFactory.js at line 167

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElements

route Route

The route for witch the HTMLElement will be created

Private methods

#getManeuverHTML ( classPrefix, routeAndManeuver )

Gives an HTMLElement with the icon, instruction, distance since the beginning of the travel (if the instruction is linked to a chained route), distance since the beginning of the route and distance till the next maneuver

Source : file viewsFactories/RouteHTMLViewsFactory.js at line 53

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElements

routeAndManeuver Object

An object with the maneuver, the route to witch the maneuver is linked and the distance between the beginning of the route and the maneuver

Returns

An HTMLElement with the Maneuver
Type : HTMLElement