summaryrefslogtreecommitdiff
path: root/public/static/geolocation.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-05-10 15:55:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-05-10 15:55:02 +0200
commit3bb39e37e3594d14c9ff9bb3024db6cff665bd45 (patch)
tree30b7702df0374e8cb3d360c842736220cd6dcc71 /public/static/geolocation.js
parentbbfbd717f6018e30d15c7bda5c0f76f660f216d9 (diff)
geolocation.js: add error case if no stations were found
Diffstat (limited to 'public/static/geolocation.js')
-rw-r--r--public/static/geolocation.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/public/static/geolocation.js b/public/static/geolocation.js
index 63c08e8..1d37c96 100644
--- a/public/static/geolocation.js
+++ b/public/static/geolocation.js
@@ -2,6 +2,8 @@ $(document).ready(function() {
var processResult = function(data) {
if (data.error) {
$('div.candidatelist').text(data.error);
+ } else if (data.candidates.length == 0) {
+ $('div.candidatelist').text("Keine Bahnhöfe in 70km Umkreis gefunden");
} else {
$.each(data.candidates, function(i, candidate) {