From 346cc00e17443b8f72f5f683ceb5f6f63837bdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 20 Nov 2020 12:35:26 +0100 Subject: remove show-area --- server.py | 8 -------- templates/index.js | 10 ---------- 2 files changed, 18 deletions(-) diff --git a/server.py b/server.py index 6a93018..97cb377 100644 --- a/server.py +++ b/server.py @@ -15,14 +15,6 @@ def index(): return read_html('templates/index.html') -@get('/show-area') -def show_area(): - rect = dict() - for (k, node) in enumerate(store.select_nodes_in_rectangle(nodes, 58.3984, 58.3990, 15.5733, 15.576)): - rect[node.id] = node.coord_tuple() - return json.dumps(rect) - - @post('/shortest-path') def shortest_path(body): body = json.loads(body) diff --git a/templates/index.js b/templates/index.js index b7b3b58..dd39c12 100644 --- a/templates/index.js +++ b/templates/index.js @@ -51,13 +51,3 @@ function showMarker(){ } showMarker() - -async function showMarkers() { - res = await fetch('/show-area'); - res = await res.json(); - for (let key in res) { - var marker = L.marker(res[key]).addTo(map) - } -} - -showMarkers() -- cgit v1.2.1