Added support for detailed station information and download links. Download links and some information are now visible. TODO: add detailed station info.
This commit is contained in:
parent
5a1b780eaf
commit
9ea976c762
Notes:
subgit
2018-03-07 17:58:56 +01:00
r656 www/trunk
@ -115,8 +115,8 @@
|
|||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="77" />
|
<col width="77" />
|
||||||
<col/>
|
<col/>
|
||||||
<col width="77" />
|
<col width="77" align="char" char="." />
|
||||||
<col width="77" />
|
<col width="77" align="char" char="." />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -129,6 +129,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<p>Download als <a id="stations-csv-link" href="link" download="stations.csv">CSV</a></p>
|
||||||
</div>
|
</div>
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<div class="tab" id="moretab"></div>
|
<div class="tab" id="moretab"></div>
|
||||||
|
15
www/misc.js
15
www/misc.js
@ -92,6 +92,7 @@ var config = {
|
|||||||
ajax: {
|
ajax: {
|
||||||
timeout: 10000, // 10 seconds
|
timeout: 10000, // 10 seconds
|
||||||
eventURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query',
|
eventURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query',
|
||||||
|
dlsvURL: 'dlsv',
|
||||||
mseedURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/dataselect/1/query',
|
mseedURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/dataselect/1/query',
|
||||||
stationURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/station/1/query',
|
stationURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/station/1/query',
|
||||||
nominatimURL: '//open.mapquestapi.com/nominatim/v1/reverse.php',
|
nominatimURL: '//open.mapquestapi.com/nominatim/v1/reverse.php',
|
||||||
@ -130,12 +131,18 @@ var config = {
|
|||||||
networkBlacklist: ['NL', 'X5'],
|
networkBlacklist: ['NL', 'X5'],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
var networkURL = {
|
||||||
|
GE: 'http://dx.doi.org/10.14470/TR560404',
|
||||||
|
GR: 'http://www.bgr.bund.de/DE/Themen/Erdbeben-Gefaehrdungsanalysen/Seismologie/Seismologie/Seismometer_Stationen/Stationsnetze/d_stationsnetz_node.html',
|
||||||
|
NL: 'http://www.knmi.nl/seismologie/seismisch_network_knmi3.html',
|
||||||
|
};
|
||||||
var networkText = {
|
var networkText = {
|
||||||
GE: 'GEOFON Program, GFZ Potsdam, Germany',
|
GE: '<a href="'+networkURL['GE']+'" target="_blank">GEOFON</a> Program, GFZ Potsdam',
|
||||||
GR: 'German Regional Seismic Network, BGR Hannover, Germany',
|
GR: '<a href="'+networkURL['GR']+'" target="_blank">German Regional Seismic Network</a>, BGR Hannover',
|
||||||
NL: 'Netherlands Seismic Network, The Netherlands',
|
NL: '<a href="'+networkURL['NL']+'" target="_blank">Netherlands Seismic Network</a>, The Netherlands',
|
||||||
RN: 'RuhrNet - Ruhr-University Bochum, Germany',
|
RN: 'RuhrNet - Ruhr-University Bochum, Germany',
|
||||||
};
|
};
|
||||||
|
var bochumStation = ['BUG', 'IBBN', 'KERA', 'KARP'];
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* document ready *
|
* document ready *
|
||||||
@ -173,7 +180,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// create tabs
|
// create tabs
|
||||||
var tabOptions = {
|
var tabOptions = {
|
||||||
active: 0,
|
active: 1,
|
||||||
disabled: [2, 3],
|
disabled: [2, 3],
|
||||||
activate: function( event, ui ) { ui['newPanel'].find('table').trigger("update", [true]); },
|
activate: function( event, ui ) { ui['newPanel'].find('table').trigger("update", [true]); },
|
||||||
};
|
};
|
||||||
|
@ -65,11 +65,30 @@ function loadStations(stime, etime) {
|
|||||||
// general station info (1st line)
|
// general station info (1st line)
|
||||||
var row = sprintf('<tr><td><a href="#" class="toggle">%s</a></td><td><a href="#" class="toggle">%s</a></td><td class="ar">%7.4f</td><td class="ar">%7.4f</td></tr>' , network, station, Number(lat), Number(lng));
|
var row = sprintf('<tr><td><a href="#" class="toggle">%s</a></td><td><a href="#" class="toggle">%s</a></td><td class="ar">%7.4f</td><td class="ar">%7.4f</td></tr>' , network, station, Number(lat), Number(lng));
|
||||||
// setting up network details (2nd line)
|
// setting up network details (2nd line)
|
||||||
row += sprintf('<tr class="tablesorter-childRow station-details"><td colspan="4">%s</td></tr>', networkText[network] || '');
|
row += sprintf('<tr class="tablesorter-childRow station-details"><td colspan="4">%s', networkText[network] || '');
|
||||||
// setting up station details (3rd line)
|
row += ( $.inArray(station, bochumStation)+1 ) ? '</br><em>Betreiber:</em> Ruhr-Universität Bochum</td></tr>' : '</td></tr>' ;
|
||||||
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">not implemented</td></tr>';
|
if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) {
|
||||||
// setting up download links (4th line)
|
// setting up station details (3rd line)
|
||||||
row += '<tr class="tablesorter-childRow station-download"><td colspan="4">not implemented</td></tr>';
|
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">not implemented</td></tr>';
|
||||||
|
// setting up download links (4th line)
|
||||||
|
var URL, fdsnxmlURL, fdsnxmlRespURL, sc3mlURL, sc3mlRespURL, dlsvURL;
|
||||||
|
URL = sprintf('%s?network=%s&station=%s', config['ajax']['stationURL'], network, station);
|
||||||
|
fdsnxmlURL = URL + '&level=station&format=xml';
|
||||||
|
fdsnxmlRespURL = URL + '&level=response&format=xml';
|
||||||
|
sc3mlURL = URL + '&level=station&format=sc3ml';
|
||||||
|
sc3mlRespURL = URL + '&level=response&format=sc3ml';
|
||||||
|
dlsvFile = sprintf('%s_%s.dlsv', network.toUpperCase(), station.toUpperCase());
|
||||||
|
row += '<tr class="tablesorter-childRow station-download"><td colspan="4">'
|
||||||
|
+ sprintf('Download details: <a href="%s" target="_blank">FDSNxml</a> or <a href="%s" target="_blank">SC3ml</a></br> ', fdsnxmlURL, sc3mlURL)
|
||||||
|
+ sprintf('Response files: <a href="%s" target="_blank">FDSNxml</a>, <a href="%s" target="_blank">SC3ml</a> ', fdsnxmlRespURL, sc3mlRespURL)
|
||||||
|
+ sprintf('or <a href="%s" download="%s" type="application/octet-stream">datalessSEED</a>', config['ajax']['dlsvURL'] + '/' + dlsvFile, dlsvFile.toLowerCase())
|
||||||
|
+ '</td></tr>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">Kontaktieren Sie den ';
|
||||||
|
row += ( networkURL[network.toUpperCase()] ) ? '<a href="'+networkURL[network.toUpperCase()]+'" target="_blank">Netzwerkkoordinator</a>' : 'Netzwerkkoordinator';
|
||||||
|
row += ' für weitere Details.</td></tr>';
|
||||||
|
};
|
||||||
$('#stationstable tbody').append(row);
|
$('#stationstable tbody').append(row);
|
||||||
addStationMarker(stationID, Number(lat), Number(lng), stationText.toUpperCase());
|
addStationMarker(stationID, Number(lat), Number(lng), stationText.toUpperCase());
|
||||||
};
|
};
|
||||||
@ -88,6 +107,9 @@ function loadStations(stime, etime) {
|
|||||||
stationLayer.bringToFront();
|
stationLayer.bringToFront();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// create stations csv download link
|
||||||
|
request_data['format'] = 'text';
|
||||||
|
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
||||||
};
|
};
|
||||||
|
|
||||||
/* initStationTable */
|
/* initStationTable */
|
||||||
|
Loading…
Reference in New Issue
Block a user