Skip to content
/ gpx Public
forked from Wilkins/gpx

[wip] Javascript library to write GPX files

License

Notifications You must be signed in to change notification settings

enzingerm/gpx

This branch is 1 commit ahead of Wilkins/gpx:master.

Folders and files

NameName
Last commit message
Last commit date
Aug 10, 2015
Apr 1, 2016
Oct 30, 2014
Oct 30, 2014
Oct 29, 2014
Oct 30, 2014
Oct 18, 2014
Oct 26, 2014
Aug 10, 2015
Oct 21, 2014
Aug 10, 2015

Repository files navigation

gpx

Javascript library to generate GPX 1.1 files (WIP)

Exemple :

Using the high level GpxFileBuilder API

//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']
}).addWayPoint({
    latitude : 50.04243,
    longitude : 4.98264,
    name : 'Waypoint #1',
    elevation : 1.243
}).addWayPoint({
    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();

About

[wip] Javascript library to write GPX files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%