Convert GPS Data To GPX Using JavaScript And jQuery - gpxmake
| File Size: | 9.04 KB |
|---|---|
| Views Total: | 1556 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
gpxmake is a JQuery plugin that has the ability to convert GPS data (routes, tracks, waypoints and routed stored in a JSON file) to a GPX file (GPS Exchange Format).
How to use it:
1. The gpxmake library requires jQuery library to load an external GPS JSON data using XMLHttpRequest.
<script src="jquery.min.js"></script>
2. Download and load the gpxmake.js script in the webpage.
<script src="gpxmake.js"></script>
3. Get your GPS JSON data using an AJAX request as follow:
$.getJSON("data.json", function (data) {
...
});
4. Initialize the gpxmake with some options.
$.getJSON("data.json", function (data) {
var gpxMake = new GpxMake({
version: '1.1',
creator: 'gpxmake',
name: "Example GPX file",
track: data.track
});
});
5. Download the GPS data as a GPX file.
$.getJSON("data.json", function (data) {
var gpxMake = new GpxMake({
version: '1.1',
creator: 'gpxmake',
name: "Example GPX file",
track: data.track
});
gpxMake.download('example');
});
Change log:
2016-12-02
- update api functions && readme
2016-11-30
- add: waypoints support
2016-11-28
- add: gpx metadata elements
2016-11-26
- add all track elements & update setTrack function
This awesome jQuery plugin is developed by feyyazakkus. For more Advanced Usages, please check the demo page or visit the official website.





