diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-12-03 14:44:41 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-12-03 14:44:41 +0100 |
| commit | e15617848b6837216a8ceed4ca23b3bb415a42f7 (patch) | |
| tree | 88da2cf0cfa7ef7901f24e8a58246b4b4254387b /server.py | |
| parent | 3e4015d2c06935b9c2c3da92f586df02c1b903d2 (diff) | |
| download | tdde25-e15617848b6837216a8ceed4ca23b3bb415a42f7.tar.gz | |
implement iterparsexml-iterparse
Diffstat (limited to 'server.py')
| -rw-r--r-- | server.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -11,7 +11,7 @@ nodes = None @get('/') def index(): global nodes - nodes = store.extract_osm_nodes("ostergotland.osm") + nodes = store.extract_osm_nodes("linkoping.osm") return read_html('templates/index.html') @@ -30,7 +30,6 @@ def shortest_path(body): target_id = algorithms.get_closest_node_id(nodes, store.Node(-1, body['lat2'], body['lng2'])) path = algorithms.find_shortest_path(nodes, source_id, target_id) - print(path) response = {"path": [(nodes[node].lat, nodes[node].lng) for node in path]} return json.dumps(response) |
