https://github.com/kchapelier/gpx
[STALLED] Javascript library to write GPX files
https://github.com/kchapelier/gpx
Last synced: 13 days ago
JSON representation
[STALLED] Javascript library to write GPX files
- Host: GitHub
- URL: https://github.com/kchapelier/gpx
- Owner: kchapelier
- License: mit
- Created: 2014-10-18T21:40:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-07-11T11:05:50.000Z (about 9 years ago)
- Last Synced: 2025-01-03T05:06:09.064Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gpx
===Javascript (CommonJS) library to generate GPX 1.1 files (STALLED).
This library was a work in progress for a project which ended up going another direction.
It 'works' but is not properly battle-tested or documented, hence why this library is not published on NPM.Exemple :
Using the high level GpxFileBuilder API
```js
//retrieve the GpxFileBuilder type
var GpxFileBuilder = require('gpx').GpxFileBuilder;//instanciate a GpxFileBuilder
var builder = new GpxFileBuilder();//generate a gpx string with two waypoints and a route with two points
var xml = builder.setFileInfo({
name : 'Test file',
description : 'A test file generated in javascript',
creator : 'My Application',
time : new Date(),
keywords : ['test', 'javascript']
}).addWayPoints([
{
latitude : 50.04243,
longitude : 4.98264,
name : 'Waypoint #1',
elevation : 1.243
},
{
latitude : 50.02394,
longitude : 4.97745,
name : 'Waypoint #2',
elevation : 1.222
}
]).addRoute(
{
name : 'Test route'
},
[
{
latitude : 50.04243,
longitude : 4.98264
},
{
latitude : 50.03561,
longitude : 4.98109
},
{
latitude : 50.02394,
longitude : 4.97745
},
]
).xml();
```