added working ALT
This commit is contained in:
parent
7d657b7222
commit
b11eef1cf7
8 changed files with 167 additions and 80 deletions
|
|
@ -67,6 +67,11 @@ function set_route_cost(cost) {
|
|||
field.value = cost;
|
||||
}
|
||||
|
||||
function set_algorithm_type(alg) {
|
||||
let field = document.getElementById("algorithm_used");
|
||||
field.value = alg;
|
||||
}
|
||||
|
||||
async function get_route() {
|
||||
let form = document.getElementById("queryform");
|
||||
data = new FormData(form);
|
||||
|
|
@ -74,6 +79,7 @@ async function get_route() {
|
|||
let response = await(fetch("/route", { method: "POST", body: data }));
|
||||
|
||||
let result = await response.json();
|
||||
set_algorithm_type(result.algorithm);
|
||||
|
||||
if (result.success === true) {
|
||||
set_route_cost(result.route.cost);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue