gpx-to-encoded-polyline
Converts GPX file upload to Encoded Polyline
gpx-to-encoded-polyline
To view package on npmjs.com go to:gpx-to-encoded-polyline repo
To view github repo go to:This package is designed to easily and efficiently handle GPX file uploads from form data and converts it to an encoded polyline string.
GPX files are extremely dense and inefficient. This package handles parsing the GPX data, and converting it to an encoded polyline string. This can be efficiently held in your database or as a variable to be decoded on the front end. |
@mapbox/polyline and sax dependencies.
This package utilizesGetting Started:
There are two functions you can use in this package:
- gpxToEncodedPolyline accepts an uploaded GPX file as an object and returns an encoded polyline. - gpxFileToEncodedPolyline accepts a GPX filepath and returns an encoded polyline. |
Troubleshooting:
This package is designed to handle a GPX file as either a file path or as an uploaded object. Be sure to use gpxToEncodedPolyline for uploads, and gpxFileToEncodedPolyline for file paths.
Let me know if you run into any issues. |