polyline-decode
v0.2.0
Published
Polyline decoding class based on google's definition
Downloads
36
Maintainers
Readme
polyline-decode
Encode and decode geo mapping polyline geometry compressed strings, use typescript validation
Install
$ npm i polyline-decode
Use
import PolylineConvert from 'polyline-decode';
const polylineConvert = new PolylineConvert();
polylineConvert.decode('gflbEcsdtEUXa@f@QZc@`@m@bCYzDOfIEjCEpDMnBCn@E^yBxRGl@Ef@Q`D@hDZ~GZxIp@fPj@`P');
// tuple<number>[]
polylineConvert.encode([35.123456,31.654321]);
// string
Credits
Typescript transpile from of https://github.com/jieter/Leaflet.encoded