google-maps-polyutil
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

google-maps-polyutil

Build Status

Google Maps PolyUtil utils, and its tests, ported from Java.

Installation

npm install --save google-maps-polyutil

Usage

var polyutil = require('google-maps-polyutil')
var locations = [{latitude: 51, longitude: 0}, {latitude: 51, longitude: 0}, {latitude: 52, longitude: 0}, {latitude: 52, longitude: 0}]
 
// Simplification
var simplifiedLocations = polyutil.simplify(locations)
 
// Encode to string
var polyline = polyline.encode(simplifiedLocations)
 
// Decode from string
var decodedLocations = polyutil.decode(polyline)

Dependents (0)

Package Sidebar

Install

npm i google-maps-polyutil

Weekly Downloads

44

Version

1.0.3

License

MIT

Last publish

Collaborators

  • chetbox