diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-15 14:44:38 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-15 14:44:38 +0200 |
commit | ad474f470cf320fa4cb2fe1453744a00e342e5f6 (patch) | |
tree | 4f87e535f291a0c79090e3ae1e9d7ad5edf74952 /public/static/js | |
parent | cfe6a490d3ca4bdedd03e1f1f5aa80f56e212950 (diff) |
geolocation: add efa support
Closes #199
Closes #241
Diffstat (limited to 'public/static/js')
-rw-r--r-- | public/static/js/geolocation.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js index ebe5dde..9689239 100644 --- a/public/static/js/geolocation.js +++ b/public/static/js/geolocation.js @@ -53,6 +53,13 @@ $(document).ready(function() { const { id, name, motis } = candidate; node = $('<a class="tablerow" href="/s/' + id + '?motis=' + motis + '"><span><i class="material-icons" aria-hidden="true">train</i>' + name + '</span></a>'); + } else if (candidate.efa !== undefined) { + const eva = candidate.eva, + name = candidate.name, + efa = candidate.efa, + distance = candidate.distance.toFixed(1); + + node = $('<a class="tablerow" href="/s/' + eva + '?efa=' + efa + '"><span><i class="material-icons" aria-hidden="true">directions</i>' + name + '</span></a>'); } else { const eva = candidate.eva, name = candidate.name, |