0.0.2 • Published 13 years ago
osm-gpx v0.0.2
Retrieve GPX data from the OpenStreetMap GPX API.
usage
With browserify:
npm install --save osm-gpxvar osmGpx = require('osm-gpx');Without:
Copy gpx.js, include it. osmGpx will be attached to window.
api
osmGpx(bbox, [pages], callback)
bboxis a[w, s, e, n]order bounding box of WGS84 coordinatespagesis an optional parameter for a limit to how many 5,000 point pages are requested. by default, it's one.callbackis called witherr, gpx, geojsonafter all pages are requested.
osmGpx(bbox, function(err, gpx, geojson) {
// GPX is the GPX XML Document
// GeoJSON is a GeoJSON version of it.
});