Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # google-polyline
  2. [![npm](https://img.shields.io/npm/v/google-polyline.svg?style=flat-square)](https://npmjs.com/package/google-polyline)
  3. [![npm license](https://img.shields.io/npm/l/google-polyline.svg?style=flat-square)](https://npmjs.com/package/google-polyline)
  4. [![npm downloads](https://img.shields.io/npm/dm/google-polyline.svg?style=flat-square)](https://npmjs.com/package/google-polyline)
  5. [![build status](https://img.shields.io/travis/jhermsmeier/node-google-polyline.svg?style=flat-square)](https://travis-ci.org/jhermsmeier/node-google-polyline)
  6. Encodes and decodes [Google's polyline format](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
  7. ## Install via [npm](https://npmjs.com)
  8. ```sh
  9. $ npm install --save google-polyline
  10. ```
  11. ## Usage
  12. ```js
  13. var polyline = require( 'google-polyline' )
  14. ```
  15. ```js
  16. polyline.encode([
  17. [ 38.5, -120.2 ],
  18. [ 40.7, -120.95 ],
  19. [ 43.252, -126.453 ]
  20. ])
  21. > '_p~iF~ps|U_ulLnnqC_mqNvxq`@'
  22. ```
  23. ```js
  24. polyline.decode( '_p~iF~ps|U_ulLnnqC_mqNvxq`@' )
  25. > [
  26. [ 38.5, -120.2 ],
  27. [ 40.7, -120.95 ],
  28. [ 43.252, -126.453 ]
  29. ]
  30. ```
  31. ## Benchmarks
  32. ```sh
  33. $ npm run benchmark
  34. ```
  35. ```
  36. # decode: 3 points ⨉ 1000
  37. ok ~9.03 ms (0 s + 9026482 ns)
  38. # decode: ~350 points ⨉ 1000
  39. ok ~34 ms (0 s + 33985497 ns)
  40. # encode: 3 points ⨉ 1000
  41. ok ~16 ms (0 s + 15696046 ns)
  42. # encode: ~350 points ⨉ 1000
  43. ok ~80 ms (0 s + 80340403 ns)
  44. ```