decode-google-map-polyline
v1.0.1
Published
A library to decode google map polyline using google official library.
Downloads
7,004
Readme
decode-google-map-polyline
A tool for decoding google map compressed polyline using official map utility. See more: https://developers.google.com/maps/documentation/utilities/polylinealgorithm
Install
npm install --save decode-google-map-polyline
Example
const decodePolyline = require('decode-google-map-polyline');
var polyline = 'neuaEejkbUEGc@j@PXl@p@P\\a@f@GHyDtEgC`DoCfDzHbQp@rAbH`JdBtBrCjDn@p@dDbDfIvHfD~CrK~Jo@z@uCrDmJnL}^ld@mVjZmQrTgArAFJ';
console.log(decodePolyline(polyline));
Bash output:
[ { lat: -31.89864, lng: 115.89811 },
{ lat: -31.89861, lng: 115.89815 },
{ lat: -31.89843, lng: 115.89793 },
{ lat: -31.89852, lng: 115.8978 },
... more items ]