Skip to content

Commit

Permalink
Fix map and address endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Duplyakin committed Feb 14, 2024
1 parent 4f8554a commit 8be3d07
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
8 changes: 7 additions & 1 deletion templates/by_address.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,13 @@
}

document.getElementById("fetching_msg").innerHTML = "";
window.location.href = "http://localhost:8080" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;
// Old way: works locally, fails in AWS
//window.location.href = "http://localhost:8080" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;
// New way: opens a new tab
window.open(
"http://localhost:8080" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years,
'_blank' // <- This is what makes it open in a new window.
);
}
}
);
Expand Down
8 changes: 7 additions & 1 deletion templates/on_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,13 @@
else {
endpoint = "ts";
}
window.location.href = "http://localhost:8080" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years;
// Old way: works locally, fails in AWS
//window.location.href = "http://localhost:8080" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years;
// New way: opens a new tab
window.open(
"http://localhost:8080" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years,
'_blank' // <- This is what makes it open in a new window.
);
}
</script>

Expand Down
8 changes: 7 additions & 1 deletion templates/universal_by_address.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,13 @@
}

document.getElementById("fetching_msg").innerHTML = "";
window.location.href = "URL_PREFIX" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;
// Old way: works locally, fails in AWS
//window.location.href = "URL_PREFIX" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;
// New way: opens a new tab
window.open(
"URL_PREFIX" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years,
'_blank' // <- This is what makes it open in a new window.
);
}
}
);
Expand Down
8 changes: 7 additions & 1 deletion templates/universal_on_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,13 @@
else {
endpoint = "ts";
}
window.location.href = "URL_PREFIX" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years;
// Old way: works locally, fails in AWS
//window.location.href = "URL_PREFIX" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years;
// New way: opens a new tab
window.open(
"URL_PREFIX" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years,
'_blank' // <- This is what makes it open in a new window.
);
}
</script>

Expand Down

0 comments on commit 8be3d07

Please sign in to comment.