beartrack-mobile/www/js/gpx-parse
IvanMTD 2404a8e44d init commit 2024-06-16 15:12:20 +03:00
..
dist init commit 2024-06-16 15:12:20 +03:00
doc init commit 2024-06-16 15:12:20 +03:00
lib init commit 2024-06-16 15:12:20 +03:00
tests init commit 2024-06-16 15:12:20 +03:00
.codeclimate.yml init commit 2024-06-16 15:12:20 +03:00
.npmignore init commit 2024-06-16 15:12:20 +03:00
.travis.yml init commit 2024-06-16 15:12:20 +03:00
Gruntfile.js init commit 2024-06-16 15:12:20 +03:00
LICENSE init commit 2024-06-16 15:12:20 +03:00
README.md init commit 2024-06-16 15:12:20 +03:00
bower.json init commit 2024-06-16 15:12:20 +03:00
browserify-mock.js init commit 2024-06-16 15:12:20 +03:00
index.js init commit 2024-06-16 15:12:20 +03:00
package.json init commit 2024-06-16 15:12:20 +03:00

README.md

gpx-parse NPM Version Build Status Coverage Status Code Climate

A library for parsing gpx data. Works against most of the Gpx v1.0 spec and Gpx v1.1. Feel free to fork if you need something specific.

More information available on the Project Page

#Installation

$ npm install gpx-parse

#Or with bower

$ bower install gpx-parse

#Usage

The module has been designed to work within node but you can also use it on the client side using the browserfy version that can be found in the dist folder.

var gpxParse = require("gpx-parse");

//from file
gpxParse.parseGpxFromFile("/path/to/gpxFile", function(error, data) {
	//do stuff
});

//or from string
gpxParse.parseGpx("<gpx></gpx>", function(error, data) {
	//do stuff
});

// or an external file via HTTP(S)
gpxParse.parseRemoteGpxFile("http://host.tld/my.gpx", function(error, data) {
    //do stuff
});

#Tests

Tests are written with nodeunit. To test make sure you have the dev dependencies installed and just run:

$ npm test