diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 13:05:30 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 17:25:30 +0100 |
| commit | 11e50657c900543856f3a1f56a96d6c861f55b6e (patch) | |
| tree | 0ec10fd0fd59cadaa1e62a5ce1a878f60d5ca30f | |
| parent | 10e3d6874745283b545d3b8029a3e5e184932c5d (diff) | |
| download | tdde25-11e50657c900543856f3a1f56a96d6c861f55b6e.tar.gz | |
allow sending squares with shortest path response
| -rw-r--r-- | templates/index.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/index.js b/templates/index.js index b7b3b58..99701d0 100644 --- a/templates/index.js +++ b/templates/index.js @@ -31,6 +31,9 @@ async function postShortestPath(event){ console.log(res.path) var poly = L.polyline(res.path).addTo(map) + for (const square of res.squares) { + L.rectangle(square.bounds, {color: square.color, weight: 1, fill: false}).addTo(map) + } } function handleMapClick ({latlng}){ |
