summaryrefslogtreecommitdiff
path: root/public/static/js/geostop.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/static/js/geostop.min.js')
-rw-r--r--public/static/js/geostop.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/static/js/geostop.min.js b/public/static/js/geostop.min.js
index 98e710b..41e18e0 100644
--- a/public/static/js/geostop.min.js
+++ b/public/static/js/geostop.min.js
@@ -1 +1 @@
-$(function(){function t(e){r(),e.error?o("Backend-Fehler:",e.error,null):0==e.candidates.length?o("Keine Bahnhöfe in 70km Umkreis gefunden","",null):$.each(e.candidates,function(e,t){var n=t.ds100,r=t.name,o=(o=t.distance).toFixed(1),t=$(document.createElement("a"));t.attr("href",n),t.text(r);r=$(document.createElement("div"));r.attr("class","distance"),r.text(o),t.append(r),$("div.candidatelist").append(t)})}var r=function(){$("div.candidatestatus").remove()},o=function(e,t,n){var r=$(document.createElement("div"));r.attr("class","error"),r.text(t);t=$(document.createElement("strong"));t.text(e),r.prepend(t),n&&((t=$(document.createElement("div"))).attr("class","errcode"),t.text(n),r.append(t)),$("div.candidatelist").append(r)};navigator.geolocation?(navigator.geolocation.getCurrentPosition(function(e){$.post("/_geolocation",{lon:e.coords.longitude,lat:e.coords.latitude},t).fail(function(e,t,n){r(),o("Netzwerkfehler: ",t,n)}),$("div.candidatestatus").text("Suche Bahnhöfe…")},function(e){r(),e.code==e.PERMISSION_DENIED?o("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):e.code==e.POSITION_UNAVAILABLE?o("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):e.code==e.TIMEOUT?o("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):o("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")}),$("div.candidatestatus").text("Position wird bestimmt…")):(r(),o("Standortanfragen werden von diesem Browser nicht unterstützt","",null))});
+$(function(){function n(e){a(),e.error?r("Backend-Fehler:",e.error,null):0==e.candidates.length?r("Keine Stationen in 70km Umkreis gefunden","",null):$.each(e.candidates,function(e,t){var n=t.eva,a=t.name,r=t.distance.toFixed(1),t=t.hafas,o=$(document.createElement("a")),n=(t?o.attr("href",n+"?hafas="+t):o.attr("href",n),o.text(a+" "),$(document.createElement("div"))),a=(n.attr("class","distance"),n.text(r),$(document.createElement("i")));a.attr("class","material-icons"),a.text(t?"directions":"train"),o.append(a),o.append(n),$("div.candidatelist").append(o)})}const a=function(){$("div.candidatestatus").remove()},r=function(e,t,n){var a=$(document.createElement("div")),t=(a.attr("class","error"),a.text(t),$(document.createElement("strong")));t.text(e),a.prepend(t),n&&((e=$(document.createElement("div"))).attr("class","errcode"),e.text(n),a.append(e)),$("div.candidatelist").append(a)};navigator.geolocation?(navigator.geolocation.getCurrentPosition(function(e){var t=new URLSearchParams(window.location.search);$.post("/_geolocation",{lon:e.coords.longitude,lat:e.coords.latitude,hafas:t.get("hafas")},n).fail(function(e,t,n){a(),r("Netzwerkfehler: ",t,n)}),$("div.candidatestatus").text("Suche Stationen…")},function(e){a(),e.code==e.PERMISSION_DENIED?r("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):e.code==e.POSITION_UNAVAILABLE?r("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):e.code==e.TIMEOUT?r("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):r("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")}),$("div.candidatestatus").text("Position wird bestimmt…")):(a(),r("Standortanfragen werden von diesem Browser nicht unterstützt","",null))});