diff --git a/www/stations.js b/www/stations.js index e6295b2..561c694 100644 --- a/www/stations.js +++ b/www/stations.js @@ -40,7 +40,7 @@ function loadStations(stime, etime) { var request_data = { endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()), startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()), - level: 'station', + level: 'channel', minlat: S-config['map']['latlngDelta'], maxlat: N+config['map']['latlngDelta'], minlon: W-config['map']['latlngDelta'], @@ -57,8 +57,8 @@ function loadStations(stime, etime) { if ( $.inArray(network, config['station']['networkBlacklist'])<0 ) { $(this).find('Station').each(function () { var station = $(this).attr('code'), - lat = $(this).find('Latitude').text(), - lng = $(this).find('Longitude').text(), + lat = $(this).find('Latitude:first').text(), + lng = $(this).find('Longitude:first').text(), stationID = network+'_'+station, stationText = network+'.'+station; if ( !stationTable[stationID] ) { @@ -69,7 +69,9 @@ function loadStations(stime, etime) { row += ( $.inArray(station, bochumStation)+1 ) ? 'Betreiber: Ruhr-Universität Bochum' : '' ; if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) { // setting up station details (3rd line) - row += '
' + + name + '' + + 'Position: ' + lat + '°N ' + lng + '°E, Höhe: ' + elevation + ' m NN'; + stationObject.find('Channel').each(function() { + var code = $(this).attr('code'); + var sensor = $(this).find('Sensor > Type').text().split(',')[0]; + var sampleRate = $(this).find('SampleRate').text(); + output += 'Kanal ' + code + ', Abtastrate ' + sampleRate + ' Hz, Sensor ' + sensor; + }); + output += ''; + return output; +}; + /* initStationTable */ function initStationTable() { // tablesorter for station list