Class GpxFactory

This class is used to create gpx files

Source : file core/lib/GpxFactory.js at line 35

Constructor

new GpxFactory ( )

The constructor

Source : file core/lib/GpxFactory.js at line 206

Public methods

routeToGpx ( routeObjId )

Transform a route into a gpx file

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

Parameters

Name Type Description
routeObjId Number

The objId of the route to save in a gpx file

Private properties

#gpxString : String

The gpx string to write in the gpx file

Source : file core/lib/GpxFactory.js at line 42

#route : Route

A reference to the Route for witch the gpx file is created

Source : file core/lib/GpxFactory.js at line 56

#timeStamp : String

The time stamp added in the gpx

Source : file core/lib/GpxFactory.js at line 49

Private getters and setters

readonly static get #TAB0 : String

Simple constant for gpx presentation

Source : file core/lib/GpxFactory.js at line 63

readonly static get #TAB1 : String

Simple constant for gpx presentation

Source : file core/lib/GpxFactory.js at line 70

readonly static get #TAB2 : String

Simple constant for gpx presentation

Source : file core/lib/GpxFactory.js at line 77

readonly static get #TAB3 : String

Simple constant for gpx presentation

Source : file core/lib/GpxFactory.js at line 84

readonly static get #TAB4 : String

Simple constant for gpx presentation

Source : file core/lib/GpxFactory.js at line 91

Private methods

#addFooter ( )

Add the footer to the gpx file

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

#addHeader ( )

Creates the header of the gpx file

Source : file core/lib/GpxFactory.js at line 97

#addRoute ( )

Add the route to the gpx file

Source : file core/lib/GpxFactory.js at line 142

#addTrack ( )

Add the track to the gpx file

Source : file core/lib/GpxFactory.js at line 163

#addWayPoints ( )

Add the waypoints to the gpx file

Source : file core/lib/GpxFactory.js at line 126

#replaceEntities ( text )

Replace the chars &, ', ", < and > with entities

Source : file core/lib/GpxFactory.js at line 113

Parameters

Name Type Description
text String

The text containing reserved chars

Returns

The text with reserved chars replaced by entities
Type : String

#saveGpxToFile ( )

Save the gpx string to a file

Source : file core/lib/GpxFactory.js at line 192