Class SvgProfileBuilder

This class provides methods to build a Route profile

Source : file core/lib/SvgProfileBuilder.js at line 33

Constructor

new SvgProfileBuilder ( )

The constructor

Source : file core/lib/SvgProfileBuilder.js at line 364

Public getters and setters

readonly static get PROFILE_HEIGHT : Number

The height of the profile

Source : file core/lib/SvgProfileBuilder.js at line 98

readonly static get PROFILE_MARGIN : Number

The margin around the profile

Source : file core/lib/SvgProfileBuilder.js at line 90

readonly static get PROFILE_WIDTH : Number

The width of the profile

Source : file core/lib/SvgProfileBuilder.js at line 106

readonly static get X_DELTA_TEXT : Number

The horizontal distance between the texts and the vertical line of the flag

Source : file core/lib/SvgProfileBuilder.js at line 114

readonly static get Y_DELTA_TEXT : Number

The vertical distance between texts of the flag

Source : file core/lib/SvgProfileBuilder.js at line 122

Public methods

createSvg ( route )

This method creates the svg with the Route profile. This svg is displayed in the profile window and in the roadbook

Source : file core/lib/SvgProfileBuilder.js at line 374

Parameters

Name Type Description
route Route

The route for witch the svg must be created

Returns

The svg element with the profile
Type : SVGElement

Private properties

#deltaElev : Number

The delta between the max and the min elevation

Source : file core/lib/SvgProfileBuilder.js at line 82

#maxElev : Number

The greatest elevation

Source : file core/lib/SvgProfileBuilder.js at line 75

#minElev : Number

The smallest elevation

Source : file core/lib/SvgProfileBuilder.js at line 68

#route : Route

A reference to the route for witch the profile is createDistanceTexts

Source : file core/lib/SvgProfileBuilder.js at line 40

#svg : SVGElement

The created svg with the profile

Source : file core/lib/SvgProfileBuilder.js at line 47

#XScale : Number

The scale used in the Y direction

Source : file core/lib/SvgProfileBuilder.js at line 61

#YScale : Number

The scale used in the Y direction

Source : file core/lib/SvgProfileBuilder.js at line 54

Private getters and setters

readonly static get #BOTTOM_PROFILE : String

The bottom position of the profile inside the svg

Source : file core/lib/SvgProfileBuilder.js at line 184

readonly static get #BOTTOM_TEXT_PROFILE : Number

The bottom position of the texts inside the svg

Source : file core/lib/SvgProfileBuilder.js at line 215

readonly static get #LEFT_PROFILE : String

The left position of the profile inside the svg

Source : file core/lib/SvgProfileBuilder.js at line 161

readonly static get #LEFT_TEXT_PROFILE : String

The left position of the texts inside the svg

Source : file core/lib/SvgProfileBuilder.js at line 193

readonly static get #MAX_X_LEGEND_NUMBER : Number

The maximum number of legends in the X direction

Source : file core/lib/SvgProfileBuilder.js at line 146

readonly static get #MAX_Y_LEGEND_NUMBER : Number

The maximum number of legends in the Y direction

Source : file core/lib/SvgProfileBuilder.js at line 154

readonly static get #RIGHT_PROFILE : String

The right position of the profile inside the svg

Source : file core/lib/SvgProfileBuilder.js at line 168

readonly static get #RIGHT_TEXT_PROFILE : String

The right position of the texts inside the svg

Source : file core/lib/SvgProfileBuilder.js at line 202

readonly static get #TOP_PROFILE : String

The top position of the profile inside the svg

Source : file core/lib/SvgProfileBuilder.js at line 177

readonly static get #X_SCALES : Number

The possible X scales for the elevation

Source : file core/lib/SvgProfileBuilder.js at line 130

readonly static get #Y_SCALES : Number

The possible Y scales for the elevation

Source : file core/lib/SvgProfileBuilder.js at line 138

Private methods

#createDistanceTexts ( )

This method creates the distance texts in the svg element

Source : file core/lib/SvgProfileBuilder.js at line 270

#createElevTexts ( )

This method creates the elevation texts in the svg element

Source : file core/lib/SvgProfileBuilder.js at line 312

#createFramePolyline ( )

This method creates the frame polyline in the svg element

Source : file core/lib/SvgProfileBuilder.js at line 253

#createProfilePolyline ( )

This method creates the profile polyline in the svg element

Source : file core/lib/SvgProfileBuilder.js at line 225

#createSvgElement ( )

This method creates the svg element

Source : file core/lib/SvgProfileBuilder.js at line 349