summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/static/js/geostop.js9
-rw-r--r--public/static/js/map-refresh.js2
2 files changed, 7 insertions, 4 deletions
diff --git a/public/static/js/geostop.js b/public/static/js/geostop.js
index fa2d6f1..69bb607 100644
--- a/public/static/js/geostop.js
+++ b/public/static/js/geostop.js
@@ -39,10 +39,13 @@ $(function() {
const eva = candidate.eva,
name = candidate.name,
distance = candidate.distance.toFixed(1),
+ efa = candidate.efa,
hafas = candidate.hafas;
const stationlink = $(document.createElement('a'));
- if (hafas) {
+ if (efa) {
+ stationlink.attr('href', eva + '?efa=' + efa);
+ } else if (hafas) {
stationlink.attr('href', eva + '?hafas=' + hafas);
} else {
stationlink.attr('href', eva);
@@ -55,7 +58,7 @@ $(function() {
const icon = $(document.createElement('i'));
icon.attr('class', 'material-icons');
- icon.text(hafas ? 'directions' : 'train');
+ icon.text((hafas || efa) ? 'directions' : 'train');
stationlink.append(icon);
stationlink.append(distancenode);
@@ -66,7 +69,7 @@ $(function() {
const processLocation = function(loc) {
const param = new URLSearchParams(window.location.search);
- $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude, hafas: param.get('hafas')}, processResult).fail(function(jqXHR, textStatus, errorThrown) {
+ $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude, efa: param.get('efa'), hafas: param.get('hafas')}, processResult).fail(function(jqXHR, textStatus, errorThrown) {
removeStatus();
showError("Netzwerkfehler: ", textStatus, errorThrown);
});
diff --git a/public/static/js/map-refresh.js b/public/static/js/map-refresh.js
index 0389323..1d8453a 100644
--- a/public/static/js/map-refresh.js
+++ b/public/static/js/map-refresh.js
@@ -69,7 +69,7 @@ function dbf_anim_fine() {
function dbf_map_reload() {
const param = new URLSearchParams(window.location.search);
- $.get('/_ajax_mapinfo/' + j_reqid + '?hafas=' + param.get('hafas'), function(data) {
+ $.get('/_ajax_mapinfo/' + j_reqid + '?efa=' + param.get('efa') + '&hafas=' + param.get('hafas'), function(data) {
$('#infobox').html(data);
dbf_map_parse();
setTimeout(dbf_map_reload, 61000);