Sports Lib API - v17.3.0
GitHub
npm
Preparing search index...
API
RouteFile
Class RouteFile
Hierarchy
StatsClassAbstract
RouteFile
Implements
RouteFileInterface
Index
Constructors
constructor
Properties
created
At
creator
name
src
File
Type
stats
Methods
add
Route
add
Routes
add
Stat
add
Waypoint
add
Waypoints
clear
Routes
clear
Stats
get
Distance
get
First
Route
get
ID
get
Routes
get
Stat
get
Stats
get
Stats
As
Array
get
Waypoints
has
Routes
remove
Stat
set
Distance
set
ID
to
JSON
Constructors
constructor
new
RouteFile
(
name
?:
string
,
srcFileType
?:
string
,
creator
?:
CreatorInterface
,
routes
?:
RouteInterface
[]
,
waypoints
?:
RouteWaypointInterface
[]
,
createdAt
?:
Date
|
null
,
)
:
RouteFile
Parameters
name
:
string
= 'New Route File'
srcFileType
:
string
= FileType.GPX
creator
:
CreatorInterface
= ...
routes
:
RouteInterface
[]
= []
waypoints
:
RouteWaypointInterface
[]
= []
createdAt
:
Date
|
null
= null
Returns
RouteFile
Properties
created
At
createdAt
:
Date
|
null
creator
creator
:
CreatorInterface
name
name
:
string
src
File
Type
srcFileType
:
string
stats
stats
:
Map
<
string
,
DataInterface
<
DefaultDataValue
>
>
= ...
Methods
add
Route
addRoute
(
route
:
RouteInterface
)
:
this
Parameters
route
:
RouteInterface
Returns
this
add
Routes
addRoutes
(
routes
:
RouteInterface
[]
)
:
this
Parameters
routes
:
RouteInterface
[]
Returns
this
add
Stat
addStat
(
stat
:
DataInterface
<
unknown
>
)
:
void
Parameters
stat
:
DataInterface
<
unknown
>
Returns
void
add
Waypoint
addWaypoint
(
waypoint
:
RouteWaypointInterface
)
:
this
Parameters
waypoint
:
RouteWaypointInterface
Returns
this
add
Waypoints
addWaypoints
(
waypoints
:
RouteWaypointInterface
[]
)
:
this
Parameters
waypoints
:
RouteWaypointInterface
[]
Returns
this
clear
Routes
clearRoutes
()
:
this
Returns
this
clear
Stats
clearStats
()
:
void
Returns
void
get
Distance
getDistance
()
:
DataDistance
Returns
DataDistance
get
First
Route
getFirstRoute
()
:
RouteInterface
Returns
RouteInterface
get
ID
getID
()
:
string
|
null
Returns
string
|
null
get
Routes
getRoutes
()
:
RouteInterface
[]
Returns
RouteInterface
[]
get
Stat
getStat
<
TValue
=
DefaultDataValue
>
(
statType
:
string
,
)
:
void
|
DataInterface
<
TValue
>
Type Parameters
TValue
=
DefaultDataValue
Parameters
statType
:
string
Returns
void
|
DataInterface
<
TValue
>
get
Stats
getStats
<
TValue
=
DefaultDataValue
>
()
:
Map
<
string
,
DataInterface
<
TValue
>
>
Type Parameters
TValue
=
DefaultDataValue
Returns
Map
<
string
,
DataInterface
<
TValue
>
>
get
Stats
As
Array
getStatsAsArray
<
TValue
=
DefaultDataValue
>
()
:
DataInterface
<
TValue
>
[]
Type Parameters
TValue
=
DefaultDataValue
Returns
DataInterface
<
TValue
>
[]
get
Waypoints
getWaypoints
()
:
RouteWaypointInterface
[]
Returns
RouteWaypointInterface
[]
has
Routes
hasRoutes
()
:
boolean
Returns
boolean
remove
Stat
removeStat
(
statType
:
string
)
:
void
Parameters
statType
:
string
Returns
void
set
Distance
setDistance
(
distance
:
DataDistance
)
:
void
Parameters
distance
:
DataDistance
Returns
void
set
ID
setID
(
id
:
string
)
:
RouteFile
Parameters
id
:
string
Returns
RouteFile
to
JSON
toJSON
()
:
RouteFileJSONInterface
Returns
RouteFileJSONInterface
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
created
At
creator
name
src
File
Type
stats
Methods
add
Route
add
Routes
add
Stat
add
Waypoint
add
Waypoints
clear
Routes
clear
Stats
get
Distance
get
First
Route
get
ID
get
Routes
get
Stat
get
Stats
get
Stats
As
Array
get
Waypoints
has
Routes
remove
Stat
set
Distance
set
ID
to
JSON
GitHub
npm
Sports Lib API - v17.3.0
Loading...