diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 13:37:01 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 17:36:48 +0100 |
| commit | 86bca81e753786e0b4e9e9d49e88f0f2a579ebba (patch) | |
| tree | 960d72104b1347b5a2133d5483251181b6ed87f2 /server.py | |
| parent | 11e50657c900543856f3a1f56a96d6c861f55b6e (diff) | |
| download | tdde25-86bca81e753786e0b4e9e9d49e88f0f2a579ebba.tar.gz | |
initial debug drawdebug-draw
Diffstat (limited to 'server.py')
| -rw-r--r-- | server.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -2,6 +2,7 @@ import json import algorithms import store +from debug_draw import DebugDraw from lib import run_server, get, post, read_html @@ -31,8 +32,10 @@ def shortest_path(body): path = algorithms.find_shortest_path(nodes, source_id, target_id) print(path) - response = {"path": [(nodes[node].lat, nodes[node].lng) for node in path]} - + response = {"path": [(nodes[node].lat, nodes[node].lng) for node in path], + "squares": DebugDraw.get_squares()} + print(DebugDraw.get_squares()) + DebugDraw.clear() return json.dumps(response) |
