{"_id":"polyline-encoded","_rev":"20-70705d04ed7870102ad56ae1ef70bd82","name":"polyline-encoded","description":"Encoding and decoding of Google's polyline encoding format","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.0":{"name":"polyline-encoded","version":"0.0.0","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","directories":{"example":"examples"},"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","gitHead":"b1f8a531c2a69a9baaba2ff7862e418593838c48","dependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0"},"_id":"polyline-encoded@0.0.0","dist":{"shasum":"0d5ff97d9b429415fee1e54e2d8d6b4d5e8aebbd","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.0.tgz","integrity":"sha512-NiaaFZG5RyqgykTu39O+4YgLLU7pMPG7znyOc1yzt76kQbUIKBc0rAdFpH5R66l+tYLx7bcnxXbuoa+++qCgXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvP1CeUmXpNXMT4CSe5uvl9JTBU4Ednk+WiLqE9Bih5gIhAN36+cAScJfG/yCMCoj3ONx5I/lj/ft+fZ2n0NT54TSa"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}]},"0.0.1":{"name":"polyline-encoded","version":"0.0.1","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","directories":{"example":"examples"},"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","gitHead":"b1f8a531c2a69a9baaba2ff7862e418593838c48","devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0"},"_id":"polyline-encoded@0.0.1","dist":{"shasum":"ba0f27d6467c2f514b652d7fdfcb20e6faf596cc","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.1.tgz","integrity":"sha512-MxvIAEjUI0Msd2swmkF8B37jn8URc6NgztpQvVDurTJ4QDIi5fYex+4d80X+roUNA/rAmpM7Xj8AQFsodsDiLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICSsT3dZ+W/Pu27e0b7p7wY6pWdr8erLOPDca9NWBjKyAiBMwq7sQ0GE/U0jYdVB6dCWgHcZ77wuGCWo9WU1jKweJg=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}]},"0.0.3":{"name":"polyline-encoded","version":"0.0.3","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","gitHead":"b1f8a531c2a69a9baaba2ff7862e418593838c48","devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0"},"_id":"polyline-encoded@0.0.3","dist":{"shasum":"0460551285a0f550170ad3cf63bc863134fc69b0","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.3.tgz","integrity":"sha512-lvEenXM5OfrqJ6i1s/qM3Zv+DBor+rYbqEPnHRV+V4EF5KT8i83uCvfkBeo+7M2dcJCdYQkd+DS3IWurDdVxRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEA9G92Z5zg1IMALnnOmjwdQi9snSUKOMkNkZBJumEtmAiA2TFE2ZdFgfAIQ55oXovpZiOwg1jCT0JIMYU3JRAAt6A=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}]},"0.0.4":{"name":"polyline-encoded","version":"0.0.4","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","gitHead":"b1f8a531c2a69a9baaba2ff7862e418593838c48","devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0"},"_id":"polyline-encoded@0.0.4","dist":{"shasum":"993afa203af3fcf50c2aa52bf3f96aaa4e37b9a7","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.4.tgz","integrity":"sha512-NOjDQRwt8vU9XDSCtTL2d6T0KMv6QcZfVoR1rTvFT2Hz9q5cjsqmI5t16kNM3Oylp7GpXp86aoeMgYeze775fg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8nBczFnnOcxZMClWDXyC+qIPfeUmX6i3PebH7RhlApAiAQB/Rj2zhvXBA2Wfcspy70JWIBtCD9zByWFgi60DomIA=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}]},"0.0.5":{"name":"polyline-encoded","version":"0.0.5","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","directories":{"example":"examples","test":"test"},"scripts":{"test":"grunt lint test"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","devDependencies":{"mocha":"~1.12.0","chai":"~1.8.1","grunt":"~0.4.1","grunt-contrib-jshint":"~0.7.0","grunt-mocha-test":"~0.7.0","grunt-contrib-watch":"~0.5.3","chai-leaflet":"0.0.8","matchdep":"~0.3.0"},"gitHead":"1c77a5dd24f64c4da202b13948602d91ffd891b5","bugs":{"url":"https://github.com/jieter/Leaflet.encoded/issues"},"homepage":"https://github.com/jieter/Leaflet.encoded","_id":"polyline-encoded@0.0.5","_shasum":"bf123333aaf956fa7a06fbc432e8ed2532462b9e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}],"dist":{"shasum":"bf123333aaf956fa7a06fbc432e8ed2532462b9e","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.5.tgz","integrity":"sha512-SJ5hlj1axCZT57yVHZQhOceYwDF31EDWwFI+sPiNCxtih9tbAE6/DGQxCJnHmbhGZK2oddYLNctdxuALZq6Tog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgb16H6HlbFWBjAzFH6erQFpeF3Fo47njn/Uhh6DW/2QIhAP63kucdQOEuCSJhePvzgMZAbwLGiCjDP1X3MalxpNJs"}]}},"0.0.6":{"name":"polyline-encoded","version":"0.0.6","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","scripts":{"lint":"eslint --config .eslintrc Polyline.encoded.js test/*.js examples/*.js","unittest":"mocha test/test.js","test":"npm run lint && npm run unittest","release":"mversion patch -m"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","devDependencies":{"chai":"~1.8.1","chai-leaflet":"0.0.8","mversion":"^1.3.0","eslint":"^0.15.1","mocha":"~1.12.0"},"gitHead":"3f1351c8990a5e356d67d270356b807e3b01ef8c","bugs":{"url":"https://github.com/jieter/Leaflet.encoded/issues"},"homepage":"https://github.com/jieter/Leaflet.encoded","_id":"polyline-encoded@0.0.6","_shasum":"68fa089c0bcd4f5928329c3ebb9814b129e22cf4","_from":".","_npmVersion":"2.6.1","_nodeVersion":"0.10.33","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}],"dist":{"shasum":"68fa089c0bcd4f5928329c3ebb9814b129e22cf4","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.6.tgz","integrity":"sha512-wOutViul2ci2cHs9sVcOPwDpxvpmfY+vot4h+zOfkzl9djHNsDaBpzGjyPuG/itLXsPCJIpHUuVdxf/smbkf6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCA34hDYXaYUeLWk+waQUX3b/zaEhE/yTW6yJPdsMjGUwIhAPdmQwks8mRQtBYJSqo0uAxIUK+MmucZjNPedmgqu4zI"}]},"directories":{}},"0.0.7":{"name":"polyline-encoded","version":"0.0.7","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","scripts":{"lint":"eslint --config .eslintrc Polyline.encoded.js test/*.js examples/*.js","unittest":"mocha test/test.js","test":"npm run lint && npm run unittest","release":"mversion patch -m"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","devDependencies":{"chai":"~1.8.1","chai-leaflet":"0.0.8","mversion":"^1.3.0","eslint":"^0.15.1","mocha":"~1.12.0"},"gitHead":"124ad942139ac5da492a02b86d04ea4ac447a2f5","bugs":{"url":"https://github.com/jieter/Leaflet.encoded/issues"},"homepage":"https://github.com/jieter/Leaflet.encoded","_id":"polyline-encoded@0.0.7","_shasum":"b8804c58fb8e3570448e5d2ec21399c5e2c90d93","_from":".","_npmVersion":"2.6.1","_nodeVersion":"0.10.33","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}],"dist":{"shasum":"b8804c58fb8e3570448e5d2ec21399c5e2c90d93","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.7.tgz","integrity":"sha512-p8IJMGesCe8sbgdFSHt7O6fvos3vkgvDuelNxAxC2WDuxv8ZmvyDEOoIBpSc0PHdvzhg++SEn0+bFRzRhsNTcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1bQ1uzvZpxGma5NwQMi6TL8fmpHDUa+nizTJHtFXhwAiACnKbktM+EZbyq89kPy/nmv4oHqYcrr96taomfW9O6tQ=="}]},"directories":{}},"0.0.8":{"name":"polyline-encoded","version":"0.0.8","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","scripts":{"lint":"eslint --config .eslintrc Polyline.encoded.js test/*.js examples/*.js","unittest":"mocha test/test.js","test":"npm run lint && npm run unittest","release":"mversion patch -m"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","devDependencies":{"chai":"~3.5.0","chai-leaflet":"0.0.12","eslint":"^2.7.0","eslint-plugin-html":"^1.4.0","mocha":"~2.4.5","mversion":"^1.10.1"},"gitHead":"645b65381204a42145ab9ac931b3557446cc805d","bugs":{"url":"https://github.com/jieter/Leaflet.encoded/issues"},"homepage":"https://github.com/jieter/Leaflet.encoded#readme","_id":"polyline-encoded@0.0.8","_shasum":"4cfb8e54a0c6b89e071dae5471e58b7442cb6f72","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}],"dist":{"shasum":"4cfb8e54a0c6b89e071dae5471e58b7442cb6f72","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.8.tgz","integrity":"sha512-APeDvnuq3TuCDughRjq4877Hn/wk5php/gTvU2kUDblQA9UYN14OGduC6D6IoYCGWTinjbpzR0SCnKdE3gc23Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD09xyLsRzp9KfKiglpbuARXzzkC7a0pQCEoPWXcBWCywIhAL0m7dld1eLz5mNfj9bDkmFgOPZwUGK9FlxtxzuGuDMw"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/polyline-encoded-0.0.8.tgz_1460976401378_0.8751834826543927"},"directories":{}},"0.0.9":{"name":"polyline-encoded","version":"0.0.9","description":"Encoding and decoding of Google's polyline encoding format","main":"Polyline.encoded.js","scripts":{"lint":"eslint --config .eslintrc Polyline.encoded.js test/*.js examples/*.js","unittest":"mocha test/test.js","test":"npm run lint && npm run unittest","release":"mversion patch -m"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"keywords":["polyline","encoding"],"author":{"name":"Jan Pieter Waagmeester"},"license":"MIT","devDependencies":{"chai":"^4.2.0","chai-leaflet":"0.0.12","eslint":"^4.3.0","eslint-plugin-html":"^3.1.1","mocha":"^3.4.2","mversion":"^1.10.1"},"gitHead":"cc459ab46b1b691f9faf5eafd23bb2797c29c5a3","bugs":{"url":"https://github.com/jieter/Leaflet.encoded/issues"},"homepage":"https://github.com/jieter/Leaflet.encoded#readme","_id":"polyline-encoded@0.0.9","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-xv6ONShzZdcISK6IT8x3IqsqxPq7HRqcPJ80V4et4hMolIRct5s/5dtUkfO7hGZEeKtWZ1fK7/fKur8gbd4fvg==","shasum":"bb5212825f3331587b200f0c5368c203eb2f1905","tarball":"https://registry.npmjs.org/polyline-encoded/-/polyline-encoded-0.0.9.tgz","fileCount":13,"unpackedSize":27188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ6+OCRA9TVsSAnZWagAAFsQP/Rz2N2GdaR8v95uX0jDb\nkx2lHh2IkQaui5XJhNSQtbaIcGwYZBF+9y62jOeOlhaK7Tnj5Tz9JRG/+LQI\n+FftDOimwLWiA7LYqsgvAniubcRtcLu2j4ZbYwaLMDbgsbTq3yPGHJ78Lt5+\n1aWTp/w3W5803+E4o+T5MewmJXTcNoTjIIZ9b84l0VyDGa38qtwoMwU/qXOv\nipJK+cUHePTXS0yLxiAHNvFJSy8bpyaP96lGUGImQkfalsp2ijyktUimcOwU\n+3hfA9lLuBBMXWKr4Bzd8CTyBoLVfa8eKSZQZgx3cbd5bbBtkLj8ECE91ql6\nAGtW5YV7wJj+U58Jhv3c6rUb0eUQpXNOj6kaJL71yDrG0CoFCB47Ch+qBcXK\nt0IwMuYyEQcE+WvV60ejwjVd+macUYCjV9vn6Q65t7i2+3ora7CQivVWLXRH\nqhe1xhbD7+aJoKPSRZTut3tVRZhWqOhabwRDKmdqyxzD6h4spt7DtQfbu8nt\nckI7ubWGwcEYSe+blBDx4ahjLj2NDmhs3CQgPU8RNXJ9N+Smtnm6OYOHL4aa\nadw9pWod/ba2VaouN9pAHMOfZpthSHNu6clXLcImdqFXIpZF3JGO6D3y55WH\n5RrRgyioVmS5TO78Dd8ZYXRwWA6OENJuA9Oub+ZuDBEF1he1o2WatOiA9+1U\nT0dl\r\n=af8E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN9zR6C4G0l5Hp4sfH0hk2B1KCnozyfz/GotXwpNmnVAIgYnLW+MKI7KterW6VffHLKS/G8n94RuEyhQiDxsACFfM="}]},"maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}],"_npmUser":{"name":"jieter","email":"jieter@jieter.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polyline-encoded_0.0.9_1581494158192_0.7222565030898642"},"_hasShrinkwrap":false}},"readme":"# Support encoded polylines in Leaflet\n\nThis Leaflet plugin extends Leaflet with functions to encode to and decode from Google maps polyline encoding.\n\n- Works with [Leaflet](https://github.com/Leaflet/Leaflet) v0.7.7 and v1.0.0-rc.1\n- Algorithm described in the [Google maps API Documentation](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).\n\n## Escaping backslashes\n*Make sure to always escape the backslashes in encoded strings!* Not doing so will result in the backslash to be interpreted as an escape character, yielding wrong results.\n\n## API\n### Utility methods\n\n- `L.PolylineUtil.encode(latlngs [, precision])`\n\n  Encode an array of `L.LatLng` objects, or an array of arrays.\n\n\n- `L.PolylineUtil.decode(encoded [, precision])`\n\n  Decode the string `encoded` to an array of `[lat, lng]`-arrays.\n\n### Extensions for `L.Polyline`\n\n- `L.Polyline.fromEncoded(encoded [, options])`\n\n  Construct a new `L.Polyline` from a string, with optional `options` object. Backslashes in strings should be properly escaped.\n\n- `L.Polyline.encodePath()`\n\n  Return an encoded string for the current Polyline.\n\n### Extensions for `L.Polygon`\n\n- `L.Polygon.fromEncoded(encoded [, options])`\n\n  Construct a new `L.Polygon` from a string, with optional `options` object. Backslashes in strings should be properly escaped.\n\n- `L.Polygon.encodePath()`\n\n  Return an encoded string for the current Polygon.\n\n## Code examples\nAfter loading ```leaflet.js```, ```src/Polyline.encoded.js``` should be included.\n\n### Encoding\n\n```javascript\nvar latlngs = [\n\t[38.5, -120.5],\n\t[40.7, -120.95],\n\t[43.252, -126.453]\n];\nvar polyline = L.polyline(latlngs);\n\n// prints \"_p~iF~cn~U_ulLn{vA_mqNvxq`@\" to the console\nconsole.log(polyline.encodePath());\n```\n\n#### Decoding\n```javascript\nvar encoded = \"_p~iF~cn~U_ulLn{vA_mqNvxq`@\";\nvar polyline = L.Polyline.fromEncoded(encoded);\n\n// prints an array of 3 LatLng objects.\nconsole.log(polyline.getLatLngs());\n```\n\nUse a decoding precision of 5 to decode OSRM Routing Engine geometries\n```javascript\nvar encoded = \"_izlhA~pvydF_{geC~{mZ_kwzCn`{nI\";\nvar polyline = L.polyline(L.PolylineUtil.decode(encoded, 5));\n\n// prints an array of 3 LatLng objects.\nconsole.log(polyline.getLatLngs());\n```\n\n## Node package\nYou can use `encode()` and `decode()` in your Nodejs scripts:\n\n`npm install polyline-encoded`\n\n```javascript\nvar polyUtil = require('polyline-encoded');\n\nvar encoded = \"_p~iF~cn~U_ulLn{vA_mqNvxq`@\";\nvar latlngs = polyUtil.decode(encoded);\n```\n","maintainers":[{"name":"jieter","email":"jieter@jieter.nl"}],"time":{"modified":"2022-06-24T07:04:43.568Z","created":"2013-08-29T10:51:21.994Z","0.0.0":"2013-08-29T10:51:25.443Z","0.0.1":"2013-08-29T10:52:57.626Z","0.0.3":"2013-08-29T10:57:45.371Z","0.0.4":"2013-09-25T12:40:10.835Z","0.0.5":"2014-12-03T08:31:12.514Z","0.0.6":"2015-03-03T20:49:43.963Z","0.0.7":"2015-03-04T19:03:39.551Z","0.0.8":"2016-04-18T10:46:42.503Z","0.0.9":"2020-02-12T07:55:58.360Z"},"author":{"name":"Jan Pieter Waagmeester"},"repository":{"type":"git","url":"git://github.com/jieter/Leaflet.encoded.git"},"homepage":"https://github.com/jieter/Leaflet.encoded#readme","keywords":["polyline","encoding"],"bugs":{"url":"https://github.com/jieter/Leaflet.encoded/issues"},"license":"MIT","readmeFilename":"README.md"}