@digitransit/

Polyline_Decode_Map

HTML, CSS, JS

Plan an itinerary and display it on a map

fork
loading
Files
  • index.html
  • index.css
  • index.js

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.31219092010554506","path":"index.html","file":{"path":"index.html","content":{"asEncoding":{"base64":"PCFkb2N0eXBlIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHRpdGxlPlBvbHlsaW5lIGRlY29kZTwvdGl0bGU+CiAgICA8IS0tIGluY2x1ZGUgTGVhZmxldCBsaWJyYXJpZXMgLS0+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vdW5wa2cuY29tL2xlYWZsZXRAMS4zLjEvZGlzdC9sZWFmbGV0LmNzcyIvPgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vdW5wa2cuY29tL2xlYWZsZXRAMS4zLjEvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL3VucGtnLmNvbS9wb2x5bGluZUAwLjIuMC9zcmMvcG9seWxpbmUuanMiPjwvc2NyaXB0PgogIDwvaGVhZD4KICA8Ym9keT4KICAgIDxwPlJpZ2h0LWNsaWNrIG9uIHRoZSBtYXAgdG8gc2V0IG9yaWdpbiBhbmQgZGVzdGluYXRpb24gcG9pbnRzPC9wPgogICAgPGRpdiBpZD0ibWFwIiBzdHlsZT0iaGVpZ2h0OjUwMHB4OyB3aWR0aDo3MDBweDsiLz4KCiAgICA8c2NyaXB0IHNyYz0iaW5kZXguanMiPjwvc2NyaXB0PgogIDwvYm9keT4KPC9odG1sPgo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<html>
  <head>
    <title>Polyline decode</title>
    <!-- include Leaflet libraries -->
    <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"/>
    <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
    <script src="https://unpkg.com/[email protected]/src/polyline.js"></script>
  </head>
  <body>
    <p>Right-click on the map to set origin and destination points</p>
    <div id="map" style="height:500px; width:700px;"/>

    <script src="index.js"></script>
  </body>
</html>
result
console