Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

decode-polyline

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decode-polyline

A library to decode google map polyline using google official library.

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
8
166.67%
Maintainers
1
Weekly downloads
 
Created
Source

Decode-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-polyline

Example

import { decodePolyline } from 'decode-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));

Output:

[ { latitude: -31.89864, longitude: 115.89811 },
  { latitude: -31.89861, longitude: 115.89815 },
  { latitude: -31.89843, longitude: 115.89793 },
  { latitude: -31.89852, longitude: 115.8978 } ]

Keywords

google

FAQs

Package last updated on 07 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts