gpx-to-encoded-polyline

1.4.4 • Public • Published

gpx-to-encoded-polyline

Converts GPX file upload to Encoded Polyline

To view package on npmjs.com go to: gpx-to-encoded-polyline

To view github repo go to: gpx-to-encoded-polyline repo

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.

This package utilizes @mapbox/polyline and sax dependencies.


Getting 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.

Package Sidebar

Install

npm i gpx-to-encoded-polyline

Weekly Downloads

2

Version

1.4.4

License

ISC

Unpacked Size

3.63 kB

Total Files

3

Last publish

Collaborators

  • patgoral