Class Garmin.GpsDataFactory
Garmin.GpsDataFactory
Defined in: GarminGpsDataStructures.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Used to parse track and/or waypoint data from a number of Xml formats.
|
| Method Attributes | Method Name and Description |
|---|---|
|
Get the tracks parsed by this factory
|
|
|
Get the waypoints parsed by this factory
|
|
|
parseGpxDocument(xml)
Parse a gpx document and save the tracks and waypoints found
|
|
|
parseGpxString(xml)
Parse a gpx string and save the tracks found as objects
|
|
|
parseGpxTracks(xml)
Parse a GPX xml document for tracks
|
|
|
parseGpxWaypoint(xml)
Parse a GPX xml waypoint into a Waypoint object.
|
|
|
parseGpxWaypoints(xml)
Parse a GPX xml document for waypoints
|
|
|
produceGpxString(Tracks, Waypoints)
Take a list of tracks and waypoints and generate a GPX xml string
|
|
|
produceTrackGpxString(Track)
Take a track object and generate a GPX xml string (without gpx or xml headers)
|
|
|
produceWaypointGpxString(WayPoint)
Take a waypoint object and generate a GPX xml string (without gpx or xml headers)
|
|
|
toString()
String representation of instance.
|
Class Detail
Garmin.GpsDataFactory()
Used to parse track and/or waypoint data from a number of Xml formats.
Currently only supports tracks from a GPX file.
Currently only supports tracks from a GPX file.
- Deprecated:
- use Garmin.GpxActivityFactory instead
Method Detail
{Array}
getTracks()
Get the tracks parsed by this factory
{Array}
getWaypoints()
Get the waypoints parsed by this factory
parseGpxDocument(xml)
Parse a gpx document and save the tracks and waypoints found
- Parameters:
- {Document} xml
- document in GPX format
parseGpxString(xml)
Parse a gpx string and save the tracks found as objects
- Parameters:
- {String} xml
- string in GPX format
{Array}
parseGpxTracks(xml)
Parse a GPX xml document for tracks
- Parameters:
- {Document} xml
- document in GPX format
{Garmin.WayPoint}
parseGpxWaypoint(xml)
Parse a GPX xml waypoint into a Waypoint object.
- Parameters:
- {Element} xml
- waypoint in GPX format
{Array}
parseGpxWaypoints(xml)
Parse a GPX xml document for waypoints
- Parameters:
- {Document} xml
- document in GPX format
{String}
produceGpxString(Tracks, Waypoints)
Take a list of tracks and waypoints and generate a GPX xml string
- Parameters:
-
{Array
} Tracks -
{Array
} Waypoints
{String}
produceTrackGpxString(Track)
Take a track object and generate a GPX xml string (without gpx or xml headers)
- Parameters:
- {Garmin.Track} Track
{String}
produceWaypointGpxString(WayPoint)
Take a waypoint object and generate a GPX xml string (without gpx or xml headers)
- Parameters:
- {Garmin.WayPoint} WayPoint
{String}
toString()
String representation of instance.