
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
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.
npm install polyline
var polyline = require('polyline');
// returns an array of lat, lon pairs
polyline.decode('_p~iF~ps|U_ulLnnqC_mqNvxq`@');
// returns a string-encoded polyline
polyline.encode([[38.5, -120.2], [40.7, -120.95], [43.252, -126.453]]);
// returns a string-encoded polyline from a GeoJSON LineString
polyline.fromGeoJSON({ "type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [[-120.2, 38.5], [-120.95, 40.7], [-126.453, 43.252]]
},
"properties": {}
});
0.2.0 (2016-07-19)
.toGeoJSON
method to convert an encoded polyline to GeoJSON
LineString.FAQs
Polyline encoding and decoding
The npm package polyline receives a total of 5,017 weekly downloads. As such, polyline popularity was classified as popular.
We found that polyline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.