Class Garmin.Track
Garmin.Track
Defined in: GarminGpsDataStructures.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
A track is an ordered list of track segments.
|
| Method Attributes | Method Name and Description |
|---|---|
|
addSegment(trackSegment)
Add a segment to this track
|
|
|
Get the total duration for this track
|
|
|
getEnd()
Get the end point for the track
|
|
|
Get the DateTimeFormat object for the end of this track
|
|
|
Get the first segment
|
|
|
Get the last segment
|
|
|
Get the total number of trackpoints in this track
|
|
|
Get the total length of the track
|
|
|
getSegment(index)
Get the segment specified on the track
If the number is negative, get's the first
If it's larger than possible, get's the last
Otherwise it gets the number requested
|
|
|
getStart()
Get the start point for the track
|
|
|
Get the DateTimeFormat object for the start of this track
|
|
|
Get the latitude of the start point for the track
|
|
|
Get the lpngitude of the start point for the track
|
|
|
Checks to see if the startDate is defined.
|
Class Detail
Garmin.Track()
A track is an ordered list of track segments.
Equivalent to a in GPX format.
Equivalent to a
- Deprecated:
- use Garmin.Activity instead
Method Detail
{Garmin.TrackPoint}
addSegment(trackSegment)
Add a segment to this track
- Parameters:
- trackSegment
{String}
getDuration()
Get the total duration for this track
{Garmin.TrackPoint}
getEnd()
Get the end point for the track
{Garmin.DateTimeFormat}
getEndDate()
Get the DateTimeFormat object for the end of this track
{Garmin.TrackSegment}
getFirstSegment()
Get the first segment
- Returns:
- The first segment of this track
{Garmin.TrackSegment}
getLastSegment()
Get the last segment
- Returns:
- The last segment of this track
{Number}
getLength()
Get the total number of trackpoints in this track
{Number}
getNumSegments()
Get the total length of the track
{Garmin.TrackSegment}
getSegment(index)
Get the segment specified on the track
If the number is negative, get's the first
If it's larger than possible, get's the last
Otherwise it gets the number requested
- Parameters:
- {Number} index
- is the segment we want
- Returns:
- A segment that fits the pattern described above
{Garmin.TrackPoint}
getStart()
Get the start point for the track
{Garmin.DateTimeFormat}
getStartDate()
Get the DateTimeFormat object for the start of this track
{Number}
getStartLat()
Get the latitude of the start point for the track
{Number}
getStartLng()
Get the lpngitude of the start point for the track
{Boolean}
isDrawable()
Checks to see if the startDate is defined. If not then this is
technically a route and presents issues for some
track log databases where timestamps are used to merge old
and new entries.
- Returns:
- True if this track has a timestamp