polyline
A simple google-esque polyline
implementation in Javascript. Compatible with nodejs (npm install polyline
and the browser (copy src/polyline.js
)).
Encodes/decodes into lat/lng coordinate pairs. Use fromGeoJSON()
to encode from GeoJSON objects.
Installation
npm install polyline
Example
var polyline = ; // returns an array of lat, lon pairspolyline; // returns a string-encoded polylinepolyline; // returns a string-encoded polyline from a GeoJSON LineStringpolyline;