%= javascript '/jquery-1.10.2.min.js'
% if ($city and $stop) {
% if ($errstr) {
Received an error from the backend service:
% }
% elsif ($frontend eq 'png') {
% }
% elsif ($frontend eq 'html') {
% }
% elsif ($frontend eq 'json') {
JSON data for
<%= $city %> <%= $stop %>
Data is cached for 1 minute: JSON format:
- error: err string if an error occured, otherwise null
- preformatted: strings used by the PNG / HTML frontend
- raw:
% if (param('backend') and param('backend') eq 'db') {
serialized
Travel::Status::DE::DeutscheBahn-objects, see the
::Result
documentation
% }
% else {
serialized
Travel::Status::DE::VRR-objects, see the
::Result
and
::Line
documentation
% }
- version: Program version (string, not numeric)
% }
% } # ($city and $stop)
% else {
VRR-Fakedisplay shows the next departures at a public transit stop, just like
the Lumino LED displays used at some stops.
It works best for the VRR (Verkehrsverbund Rhein-Ruhr), but also supports most
other German transit networks.
% }
notes:
- The EFA backend does not support Umlauts
- For Düsseldorf, the DB backend usually gives better results
- If you write the city correctly (like "Essen", not "essen"), vrr-fake can
shorten destination names
- Example
%= javascript begin
function reloadDisplay() {
d = new Date();
$("#display").attr("src", "../<%= $city %>/<%= $stop %>.<%= $frontend %>?<%= $params %>&r="+d.getTime())
setTimeout('reloadDisplay()', 60000);
}
setTimeout('reloadDisplay()', 60000);
% end