summaryrefslogtreecommitdiff
path: root/public/static/js/geostop.js
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-08-29 20:54:11 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-08-29 20:54:54 +0200
commit6a671d45390c883d994defdaa544405223b8dc29 (patch)
tree31d7e142891749e2e3256e1cab6b325fbb360d05 /public/static/js/geostop.js
parentfab688d0da2242a2dc9145c82eafc0a9877d3f74 (diff)
geostop: always show hafas and iris stops
Diffstat (limited to 'public/static/js/geostop.js')
-rw-r--r--public/static/js/geostop.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/public/static/js/geostop.js b/public/static/js/geostop.js
index f91057a..80e8311 100644
--- a/public/static/js/geostop.js
+++ b/public/static/js/geostop.js
@@ -43,20 +43,25 @@ $(function() {
const stationlink = $(document.createElement('a'));
stationlink.attr('href', eva + '?hafas=' + hafas);
- stationlink.text(name);
+ stationlink.text(name + ' ');
const distancenode = $(document.createElement('div'));
distancenode.attr('class', 'distance');
distancenode.text(distance);
+ const icon = $(document.createElement('i'));
+ icon.attr('class', 'material-icons');
+ icon.text(hafas ? 'directions' : 'train');
+
+ stationlink.append(icon);
stationlink.append(distancenode);
$('div.candidatelist').append(stationlink);
});
}
};
- var processLocation = function(loc) {
- $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude, hafas: window.location.href.match('hafas=1') ? 1 : 0}, processResult).fail(function(jqXHR, textStatus, errorThrown) {
+ const processLocation = function(loc) {
+ $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude}, processResult).fail(function(jqXHR, textStatus, errorThrown) {
removeStatus();
showError("Netzwerkfehler: ", textStatus, errorThrown);
});