Avoid redirect
This commit is contained in:
parent
4cfac906ac
commit
3193c6d507
@ -40,7 +40,7 @@
|
|||||||
zoomOffset: -1
|
zoomOffset: -1
|
||||||
}).addTo(mymap);
|
}).addTo(mymap);
|
||||||
|
|
||||||
$.getJSON("/api/station", (stations) => {
|
$.getJSON("/api/station/", (stations) => {
|
||||||
if(stations.length == 1) {
|
if(stations.length == 1) {
|
||||||
mymap.setView([stations[0]["lat"], stations[0]["lon"]], 6);
|
mymap.setView([stations[0]["lat"], stations[0]["lon"]], 6);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
zoomOffset: -1
|
zoomOffset: -1
|
||||||
}).addTo(mymap);
|
}).addTo(mymap);
|
||||||
|
|
||||||
$.getJSON("/api/station?s={{ station.dwd_id }}", (stations) => {
|
$.getJSON("/api/station/?s={{ station.dwd_id }}", (stations) => {
|
||||||
if(stations.length == 1) {
|
if(stations.length == 1) {
|
||||||
mymap.setView([stations[0]["lat"], stations[0]["lon"]], 6);
|
mymap.setView([stations[0]["lat"], stations[0]["lon"]], 6);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user