sharedstreets / sharedstreets-js

SharedStreets (Node.js & Javascript)
https://sharedstreets.io
MIT License
77 stars 25 forks source link

Web Bundle works 🎉 #2

Closed DenisCarriere closed 6 years ago

DenisCarriere commented 6 years ago

@migurski @kpwebb Great news! I've got a SharedStreets web bundle working, the biggest hurdle was the Node.js crypto library since it's not yet implemented in the browser.

Here's a demo in the Chrome web console able to generate "on the fly" SharedStreets Intersection Reference IDs (GeoJSON).

sharedstreets javascript

HTML

You can try it out right now by making a simple HTML page.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>SharedStreets.io Javascript</title>
    <script src='https://unpkg.com/sharedstreets/dist/sharedstreets.js'></script>
  </head>
  <body>
  <script>
    console.log(sharedstreets.intersection([110, 45]));
  </script>
  </body>
</html>