Loading public/static/geolocation.js +13 −1 Original line number Diff line number Diff line Loading @@ -22,8 +22,20 @@ $(document).ready(function() { $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude}, processResult); }; var processError = function(error) { if (error.code == error.PERMISSION_DENIED) { $('div.candidatelist').text('Geolocation request denied'); } else if (error.code == error.POSITION_UNAVAILABLE) { $('div.candidatelist').text('Geolocation not available'); } else if (error.code == error.TIMEOUT) { $('div.candidatelist').text('Geolocation timeout'); } else { $('div.candidatelist').text('Unknown error'); } }; if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(processLocation); navigator.geolocation.getCurrentPosition(processLocation, processError); } else { $('div.candidatelist').text('Geolocation is not supported by your browser'); } Loading templates/layouts/default.html.ep +2 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ on 2015-01-02 at 07:00 CET.</div> Alle Angaben ohne Gewähr. </p> <p class="geolink"> <a href="<%= url_for('_auto')->to_abs->scheme('https') %>">Nahe gelegene Bahnhöfe suchen</a> <a href="<%= url_for('_auto')->to_abs->scheme('https') %>">Bahnhöfe im Umfeld suchen</a> (experimentell) </p> % } Loading Loading
public/static/geolocation.js +13 −1 Original line number Diff line number Diff line Loading @@ -22,8 +22,20 @@ $(document).ready(function() { $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude}, processResult); }; var processError = function(error) { if (error.code == error.PERMISSION_DENIED) { $('div.candidatelist').text('Geolocation request denied'); } else if (error.code == error.POSITION_UNAVAILABLE) { $('div.candidatelist').text('Geolocation not available'); } else if (error.code == error.TIMEOUT) { $('div.candidatelist').text('Geolocation timeout'); } else { $('div.candidatelist').text('Unknown error'); } }; if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(processLocation); navigator.geolocation.getCurrentPosition(processLocation, processError); } else { $('div.candidatelist').text('Geolocation is not supported by your browser'); } Loading
templates/layouts/default.html.ep +2 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ on 2015-01-02 at 07:00 CET.</div> Alle Angaben ohne Gewähr. </p> <p class="geolink"> <a href="<%= url_for('_auto')->to_abs->scheme('https') %>">Nahe gelegene Bahnhöfe suchen</a> <a href="<%= url_for('_auto')->to_abs->scheme('https') %>">Bahnhöfe im Umfeld suchen</a> (experimentell) </p> % } Loading