Integrating changes made on web server
This commit is contained in:
parent
9bb73b9ab5
commit
2251f25fcb
@ -1 +1,7 @@
|
|||||||
Allow from all
|
Allow from all
|
||||||
|
Header always set Access-Control-Allow-Origin "https://fdsnws.geophysik.ruhr-uni-bochum.de"
|
||||||
|
Header always append Access-Control-Allow-Origin "https://photon.komoot.de"
|
||||||
|
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
|
||||||
|
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
|
||||||
|
Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location"
|
||||||
|
Header always set Access-Control-Max-Age "600"
|
||||||
|
@ -40,18 +40,13 @@ function addTableRow(row, table) {
|
|||||||
|
|
||||||
/* do reverse geolocation lookup */
|
/* do reverse geolocation lookup */
|
||||||
function getGeolocation(id, lat, lng) {
|
function getGeolocation(id, lat, lng) {
|
||||||
if ( !geolocationTable[id] ) {
|
if ( $.inArray(id, geolocationTable) == -1 ) {
|
||||||
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng } )
|
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng } )
|
||||||
.done(function( json ) {
|
.done(function( json ) {
|
||||||
var city = json.address["city"];
|
if ( json.features[0] ) {
|
||||||
if ( ~city ) { city = json.address["town"]; };
|
|
||||||
if ( ~city ) { city = json.address["village"]; };
|
|
||||||
var country = json.address["country"];
|
|
||||||
var countryCode = json.address["country_code"].toUpperCase();
|
|
||||||
var city = json.features[0].properties.city;
|
var city = json.features[0].properties.city;
|
||||||
var countryCode = json.features[0].properties.country;
|
var countryCode = json.features[0].properties.country;
|
||||||
geolocationTable[id] = city;
|
geolocationTable[id] = city;
|
||||||
( countryCode != "DE" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
|
||||||
( countryCode != "Germany" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
( countryCode != "Germany" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
||||||
if ( city ) {
|
if ( city ) {
|
||||||
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
||||||
@ -62,6 +57,7 @@ function getGeolocation(id, lat, lng) {
|
|||||||
} else {
|
} else {
|
||||||
// console.log("Nominatim did not provide a city tag for "+lat+" / "+lng);
|
// console.log("Nominatim did not provide a city tag for "+lat+" / "+lng);
|
||||||
};
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
.fail(function( jqxhr, textStatus, error ) {
|
.fail(function( jqxhr, textStatus, error ) {
|
||||||
var err = textStatus + ", " + error;
|
var err = textStatus + ", " + error;
|
||||||
@ -93,7 +89,7 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
|||||||
} else {
|
} else {
|
||||||
request_data = {
|
request_data = {
|
||||||
starttime: sprintf("%d-%02d-%02d", rtime.getFullYear(), rtime.getMonth()+1, rtime.getDate()),
|
starttime: sprintf("%d-%02d-%02d", rtime.getFullYear(), rtime.getMonth()+1, rtime.getDate()),
|
||||||
orderby: 'time',
|
orderby: 'time-asc',
|
||||||
minlat: sprintf('%.2f', mapBounds.getSouth()-config['map']['latlngDelta']),
|
minlat: sprintf('%.2f', mapBounds.getSouth()-config['map']['latlngDelta']),
|
||||||
maxlat: sprintf('%.2f', mapBounds.getNorth()+config['map']['latlngDelta']),
|
maxlat: sprintf('%.2f', mapBounds.getNorth()+config['map']['latlngDelta']),
|
||||||
minlon: sprintf('%.2f', mapBounds.getWest()-config['map']['latlngDelta']),
|
minlon: sprintf('%.2f', mapBounds.getWest()-config['map']['latlngDelta']),
|
||||||
@ -124,7 +120,7 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
|||||||
var type = $(this).find('type').last().text();
|
var type = $(this).find('type').last().text();
|
||||||
var location
|
var location
|
||||||
// create table row: Date, Time, Mag, Location
|
// create table row: Date, Time, Mag, Location
|
||||||
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] )+1 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] ) >= 0 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
||||||
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
||||||
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||||
// general event info (1st line)
|
// general event info (1st line)
|
||||||
@ -432,7 +428,12 @@ $(document).ready(function() {
|
|||||||
typetext += '(bergbau-)induziertes Ereignis (Kreis)';
|
typetext += '(bergbau-)induziertes Ereignis (Kreis)';
|
||||||
break;
|
break;
|
||||||
case 'quarry blast':
|
case 'quarry blast':
|
||||||
typetext += 'Steinbruchsprengung (Rad)';
|
case 'controlled explosion':
|
||||||
|
case 'explosion':
|
||||||
|
typetext += 'Sprengung (Rad)';
|
||||||
|
break;
|
||||||
|
case 'nuclear explosion':
|
||||||
|
typetext += 'Atomwaffentest (Viereck)';
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
$("#events-type").append(typetext);
|
$("#events-type").append(typetext);
|
||||||
|
@ -40,18 +40,13 @@ function addTableRow(row, table) {
|
|||||||
|
|
||||||
/* do reverse geolocation lookup */
|
/* do reverse geolocation lookup */
|
||||||
function getGeolocation(id, lat, lng) {
|
function getGeolocation(id, lat, lng) {
|
||||||
if ( !geolocationTable[id] ) {
|
if ( $.inArray(id, geolocationTable) == -1 ) {
|
||||||
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng } )
|
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng } )
|
||||||
.done(function( json ) {
|
.done(function( json ) {
|
||||||
var city = json.address["city"];
|
if ( json.features[0] ) {
|
||||||
if ( ~city ) { city = json.address["town"]; };
|
|
||||||
if ( ~city ) { city = json.address["village"]; };
|
|
||||||
var country = json.address["country"];
|
|
||||||
var countryCode = json.address["country_code"].toUpperCase();
|
|
||||||
var city = json.features[0].properties.city;
|
var city = json.features[0].properties.city;
|
||||||
var countryCode = json.features[0].properties.country;
|
var countryCode = json.features[0].properties.country;
|
||||||
geolocationTable[id] = city;
|
geolocationTable[id] = city;
|
||||||
( countryCode != "DE" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
|
||||||
( countryCode != "Germany" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
( countryCode != "Germany" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
||||||
if ( city ) {
|
if ( city ) {
|
||||||
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
||||||
@ -62,6 +57,7 @@ function getGeolocation(id, lat, lng) {
|
|||||||
} else {
|
} else {
|
||||||
// console.log("Nominatim did not provide a city tag for "+lat+" / "+lng);
|
// console.log("Nominatim did not provide a city tag for "+lat+" / "+lng);
|
||||||
};
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
.fail(function( jqxhr, textStatus, error ) {
|
.fail(function( jqxhr, textStatus, error ) {
|
||||||
var err = textStatus + ", " + error;
|
var err = textStatus + ", " + error;
|
||||||
@ -93,7 +89,7 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
|||||||
} else {
|
} else {
|
||||||
request_data = {
|
request_data = {
|
||||||
starttime: sprintf("%d-%02d-%02d", rtime.getFullYear(), rtime.getMonth()+1, rtime.getDate()),
|
starttime: sprintf("%d-%02d-%02d", rtime.getFullYear(), rtime.getMonth()+1, rtime.getDate()),
|
||||||
orderby: 'time',
|
orderby: 'time-asc',
|
||||||
minlat: sprintf('%.2f', mapBounds.getSouth()-config['map']['latlngDelta']),
|
minlat: sprintf('%.2f', mapBounds.getSouth()-config['map']['latlngDelta']),
|
||||||
maxlat: sprintf('%.2f', mapBounds.getNorth()+config['map']['latlngDelta']),
|
maxlat: sprintf('%.2f', mapBounds.getNorth()+config['map']['latlngDelta']),
|
||||||
minlon: sprintf('%.2f', mapBounds.getWest()-config['map']['latlngDelta']),
|
minlon: sprintf('%.2f', mapBounds.getWest()-config['map']['latlngDelta']),
|
||||||
@ -123,8 +119,8 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
|||||||
var evaluationStatus = $(this).find('origin > evaluationStatus').text();
|
var evaluationStatus = $(this).find('origin > evaluationStatus').text();
|
||||||
var type = $(this).find('type').last().text();
|
var type = $(this).find('type').last().text();
|
||||||
var location
|
var location
|
||||||
// get location, try this in order:
|
// create table row: Date, Time, Mag, Location
|
||||||
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] )+1 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] ) >= 0 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
||||||
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
||||||
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||||
// general event info (1st line)
|
// general event info (1st line)
|
||||||
@ -432,8 +428,13 @@ $(document).ready(function() {
|
|||||||
typetext += '(mining-)induced event (circle)';
|
typetext += '(mining-)induced event (circle)';
|
||||||
break;
|
break;
|
||||||
case 'quarry blast':
|
case 'quarry blast':
|
||||||
|
case 'controlled explosion':
|
||||||
|
case 'explosion':
|
||||||
typetext += 'quarry blast (wheel)';
|
typetext += 'quarry blast (wheel)';
|
||||||
break;
|
break;
|
||||||
|
case 'nuclear explosion':
|
||||||
|
typetext += 'nuclear weapon test (square)';
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
$("#events-type").append(typetext);
|
$("#events-type").append(typetext);
|
||||||
});
|
});
|
||||||
|
@ -40,6 +40,9 @@
|
|||||||
<script src="external/jQuery.print.js"></script>
|
<script src="external/jQuery.print.js"></script>
|
||||||
<script src="external/leaflet.easyPrint.js"></script>
|
<script src="external/leaflet.easyPrint.js"></script>
|
||||||
|
|
||||||
|
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script>
|
||||||
|
<!-- <script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script> -->
|
||||||
|
|
||||||
<!-- Map, Events & Stations -->
|
<!-- Map, Events & Stations -->
|
||||||
<script type="text/javascript" src="misc.js"></script>
|
<script type="text/javascript" src="misc.js"></script>
|
||||||
<script type="text/javascript" src="geolocation.js"></script>
|
<script type="text/javascript" src="geolocation.js"></script>
|
||||||
@ -115,7 +118,7 @@
|
|||||||
<span id="events-type">Symbols:</span>
|
<span id="events-type">Symbols:</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="table-caption">
|
<p class="table-caption">
|
||||||
Nominatim Search Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img alt="Mapquest Logo" src="//developer.mapquest.com/content/osm/mq_logo.png" />
|
Reverse Geolocation courtesy of <a href="http://photon.komoot.de/" target="_blank">Photon by Komoot</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- Stations -->
|
<!-- Stations -->
|
||||||
|
38
www/map.js
38
www/map.js
@ -17,7 +17,7 @@
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU General Public License along
|
||||||
with this program. If not, see http://www.gnu.org/licenses/.
|
with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
@ -61,6 +61,12 @@ function addEventMarker(id, lat, lng, mag, type) {
|
|||||||
case 'earthquake':
|
case 'earthquake':
|
||||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||||
break;
|
break;
|
||||||
|
case 'nuclear explosion':
|
||||||
|
markerOptions['numberOfSides'] = 4;
|
||||||
|
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||||
|
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||||
|
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||||
|
break;
|
||||||
case 'explosion':
|
case 'explosion':
|
||||||
markerOptions['numberOfSides'] = 6;
|
markerOptions['numberOfSides'] = 6;
|
||||||
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||||
@ -68,6 +74,7 @@ function addEventMarker(id, lat, lng, mag, type) {
|
|||||||
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||||
break;
|
break;
|
||||||
case 'quarry blast':
|
case 'quarry blast':
|
||||||
|
case 'controlled explosion':
|
||||||
markerOptions['numberOfPoints'] = 7;
|
markerOptions['numberOfPoints'] = 7;
|
||||||
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||||
@ -138,9 +145,9 @@ $(document).ready(function() {
|
|||||||
switch ( config['map']['baselayer'] ) {
|
switch ( config['map']['baselayer'] ) {
|
||||||
case 'osmde': // add OpenStreetMap.DE tile layer
|
case 'osmde': // add OpenStreetMap.DE tile layer
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||||
{
|
{
|
||||||
attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||||
@ -153,7 +160,7 @@ $(document).ready(function() {
|
|||||||
break;
|
break;
|
||||||
case 'aerial': // add ESRI WordImagery tile layer
|
case 'aerial': // add ESRI WordImagery tile layer
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||||
{
|
{
|
||||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
@ -162,18 +169,19 @@ $(document).ready(function() {
|
|||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
||||||
{
|
{
|
||||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.komoot.de/">Komoot</a>',
|
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.komoot.de/">Komoot</a>',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
case 'mapquestgray': // add MapQuestOSM tile layer
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
null;
|
||||||
L.tileLayer.grayscale('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
// map = L.map('map', { zoomControl: false, worldCopyJump: true, layers: mapLayer }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
{
|
// L.tileLayer.grayscale('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||||
subdomains: '1234',
|
// {
|
||||||
detectRetina: true,
|
// subdomains: '1234',
|
||||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
// detectRetina: true,
|
||||||
}).addTo(map);
|
// attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||||
break;
|
//}).addTo(map);
|
||||||
|
//break;
|
||||||
case 'mapquest': // add MapQuestOSM tile layer
|
case 'mapquest': // add MapQuestOSM tile layer
|
||||||
null;
|
null;
|
||||||
default:
|
default:
|
||||||
@ -183,11 +191,11 @@ $(document).ready(function() {
|
|||||||
worldCopyJump: true,
|
worldCopyJump: true,
|
||||||
layers: mapLayer,
|
layers: mapLayer,
|
||||||
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
//L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
//L.tileLayer('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||||
//{
|
//{
|
||||||
//subdomains: '1234',
|
//subdomains: '1234',
|
||||||
//detectRetina: true,
|
//detectRetina: true,
|
||||||
//attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
//attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||||
//}).addTo(map);
|
//}).addTo(map);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU General Public License along
|
||||||
with this program. If not, see http://www.gnu.org/licenses/.
|
with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
@ -61,6 +61,12 @@ function addEventMarker(id, lat, lng, mag, type) {
|
|||||||
case 'earthquake':
|
case 'earthquake':
|
||||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||||
break;
|
break;
|
||||||
|
case 'nuclear explosion':
|
||||||
|
markerOptions['numberOfSides'] = 4;
|
||||||
|
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||||
|
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||||
|
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||||
|
break;
|
||||||
case 'explosion':
|
case 'explosion':
|
||||||
markerOptions['numberOfSides'] = 6;
|
markerOptions['numberOfSides'] = 6;
|
||||||
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||||
@ -68,6 +74,7 @@ function addEventMarker(id, lat, lng, mag, type) {
|
|||||||
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||||
break;
|
break;
|
||||||
case 'quarry blast':
|
case 'quarry blast':
|
||||||
|
case 'controlled explosion':
|
||||||
markerOptions['numberOfPoints'] = 7;
|
markerOptions['numberOfPoints'] = 7;
|
||||||
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||||
@ -133,19 +140,19 @@ function initMapLink() {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
// create a map in the "map" div, set the view to a given place and zoom
|
// create a map in the "map" div, set the view to a given place and zoom
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
|
||||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
|
||||||
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
|
||||||
|
|
||||||
// create baselayer
|
// create baselayer
|
||||||
switch ( config['map']['baselayer'] ) {
|
switch ( config['map']['baselayer'] ) {
|
||||||
case 'osmde': // add OpenStreetMap.DE tile layer
|
case 'osmde': // add OpenStreetMap.DE tile layer
|
||||||
L.tileLayer('http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
|
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||||
{
|
{
|
||||||
attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||||
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
||||||
{
|
{
|
||||||
attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ',
|
attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ',
|
||||||
@ -153,35 +160,48 @@ $(document).ready(function() {
|
|||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'aerial': // add ESRI WordImagery tile layer
|
case 'aerial': // add ESRI WordImagery tile layer
|
||||||
L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
|
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||||
{
|
{
|
||||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'komoot': // add OpenStreetMap.DE tile layer
|
case 'komoot': // add OpenStreetMap.DE tile layer
|
||||||
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
||||||
{
|
{
|
||||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.komoot.de/">Komoot</a>',
|
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.komoot.de/">Komoot</a>',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
case 'mapquestgray': // add MapQuestOSM tile layer
|
||||||
L.tileLayer.grayscale('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
null;
|
||||||
{
|
// map = L.map('map', { zoomControl: false, worldCopyJump: true, layers: mapLayer }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
subdomains: '1234',
|
// L.tileLayer.grayscale('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||||
detectRetina: true,
|
// {
|
||||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
// subdomains: '1234',
|
||||||
}).addTo(map);
|
// detectRetina: true,
|
||||||
break;
|
// attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||||
|
//}).addTo(map);
|
||||||
|
//break;
|
||||||
case 'mapquest': // add MapQuestOSM tile layer
|
case 'mapquest': // add MapQuestOSM tile layer
|
||||||
null;
|
null;
|
||||||
default:
|
default:
|
||||||
L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
var mapLayer = MQ.mapLayer();
|
||||||
{
|
map = L.map('map', {
|
||||||
subdomains: '1234',
|
zoomControl: false,
|
||||||
detectRetina: true,
|
worldCopyJump: true,
|
||||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
layers: mapLayer,
|
||||||
}).addTo(map);
|
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
|
//L.tileLayer('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||||
|
//{
|
||||||
|
//subdomains: '1234',
|
||||||
|
//detectRetina: true,
|
||||||
|
//attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||||
|
//}).addTo(map);
|
||||||
};
|
};
|
||||||
|
// add controls
|
||||||
|
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||||
|
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
||||||
|
|
||||||
// create station and event layer
|
// create station and event layer
|
||||||
// stationLayer = L.geoJson().addTo(map);
|
// stationLayer = L.geoJson().addTo(map);
|
||||||
|
25
www/misc.js
25
www/misc.js
@ -91,10 +91,10 @@ var stationTable = {};
|
|||||||
var config = {
|
var config = {
|
||||||
ajax: {
|
ajax: {
|
||||||
timeout: 20000, // 20 seconds
|
timeout: 20000, // 20 seconds
|
||||||
eventURL: '/fdsnws/event/1/query',
|
eventURL: 'https://fdsnws.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query',
|
||||||
dlsvURL: 'dlsv',
|
dlsvURL: 'dlsv',
|
||||||
mseedURL: '/fdsnws/dataselect/1/query',
|
mseedURL: 'https://fdsnws.geophysik.ruhr-uni-bochum.de/fdsnws/dataselect/1/query',
|
||||||
stationURL: '/fdsnws/station/1/query',
|
stationURL: 'https://fdsnws.geophysik.ruhr-uni-bochum.de/fdsnws/station/1/query',
|
||||||
nominatimURL: 'https://photon.komoot.de/reverse',
|
nominatimURL: 'https://photon.komoot.de/reverse',
|
||||||
timespan: 180,
|
timespan: 180,
|
||||||
},
|
},
|
||||||
@ -105,7 +105,9 @@ var config = {
|
|||||||
markerColorH: 'red',
|
markerColorH: 'red',
|
||||||
minMag: 1.2,
|
minMag: 1.2,
|
||||||
minMagDelta: 0.1,
|
minMagDelta: 0.1,
|
||||||
typeWhitelist: ['earthquake', 'induced or triggered event', 'quarry blast', 'explosion'],
|
typeWhitelist: ['earthquake', 'induced or triggered event', 'controlled explosion'],
|
||||||
|
// typeWhitelist: ['earthquake', 'induced or triggered event', 'controlled explosion', 'nuclear explosion'],
|
||||||
|
// typeWhitelist: ['earthquake', 'induced or triggered event'],
|
||||||
},
|
},
|
||||||
map: {
|
map: {
|
||||||
zoomDefault: 9,
|
zoomDefault: 9,
|
||||||
@ -128,7 +130,11 @@ var config = {
|
|||||||
NL_WIT: 3,
|
NL_WIT: 3,
|
||||||
NL_WTSB: 3,
|
NL_WTSB: 3,
|
||||||
},
|
},
|
||||||
networkBlacklist: ['NL', 'X5'],
|
networkBlacklist: ['NL', 'X5', '1A', 'AM'],
|
||||||
|
stationBlacklist: ['RN_WEA2', 'RN_ACN', 'RN_BHE', 'RN_ENT', 'RN_GSH', 'RN_HES', 'RN_JCKS', 'RN_LOH',
|
||||||
|
'RN_OLF', 'RN_PLH', 'RN_RWB', 'RN_SOR', 'RN_TDN', 'RN_WBS',
|
||||||
|
'RN_HAM1', 'RN_HAM2', 'RN_HAM3', 'RN_HAM4', 'RN_HAM5', 'RN_HAM6', 'RN_HAM7', 'RN_HAM8', 'RN_HAM9',
|
||||||
|
'RN_HAM10', 'RN_HAM11', 'RN_HAM12', 'RN_HAM13', 'RN_HAM14', 'RN_HAM15', 'RN_HAM16', 'RN_HAM17'],
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
active: 0,
|
active: 0,
|
||||||
@ -139,13 +145,18 @@ var config = {
|
|||||||
var networkURL = {
|
var networkURL = {
|
||||||
GE: 'http://dx.doi.org/10.14470/TR560404',
|
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',
|
GR: 'http://www.bgr.bund.de/DE/Themen/Erdbeben-Gefaehrdungsanalysen/Seismologie/Seismologie/Seismometer_Stationen/Stationsnetze/d_stationsnetz_node.html',
|
||||||
|
NH: 'http://www.gd.nrw.de/gg_le.htm',
|
||||||
NL: 'http://www.knmi.nl/seismologie/seismisch_network_knmi3.html',
|
NL: 'http://www.knmi.nl/seismologie/seismisch_network_knmi3.html',
|
||||||
|
RN: 'https://doi.org/10.7914/SN/RN',
|
||||||
|
YD: 'https://doi.org/10.7914/SN/YD_2020',
|
||||||
};
|
};
|
||||||
var networkText = {
|
var networkText = {
|
||||||
GE: '<a href="'+networkURL['GE']+'" target="_blank">GEOFON</a> Program, GFZ Potsdam',
|
GE: '<a href="'+networkURL['GE']+'" target="_blank">GEOFON Seismic Network</a> - Deutsches GeoForschungsZentrum GFZ',
|
||||||
GR: '<a href="'+networkURL['GR']+'" target="_blank">German Regional Seismic Network</a>, BGR Hannover',
|
GR: '<a href="'+networkURL['GR']+'" target="_blank">German Regional Seismic Network</a>, BGR Hannover',
|
||||||
|
NH: '<a href="'+networkURL['NH']+'" target="_blank">Geologischer Dienst NRW</a>, Krefeld',
|
||||||
NL: '<a href="'+networkURL['NL']+'" target="_blank">Netherlands Seismic Network</a>, The Netherlands',
|
NL: '<a href="'+networkURL['NL']+'" target="_blank">Netherlands Seismic Network</a>, The Netherlands',
|
||||||
RN: 'RuhrNet - Ruhr-University Bochum, Germany',
|
RN: '<a href="'+networkURL['RN']+'" target="_blank">RuhrNet - Ruhr-University Bochum, Germany</a>',
|
||||||
|
YD: '<a href="'+networkURL['YD']+'" target="_blank">FloodRisk Seismic Network</a>',
|
||||||
};
|
};
|
||||||
var bochumStation = ['BUG', 'IBBN', 'KERA', 'KARP'];
|
var bochumStation = ['BUG', 'IBBN', 'KERA', 'KARP'];
|
||||||
|
|
||||||
|
@ -9,6 +9,29 @@ var specialEvents = [
|
|||||||
//'bug2014ilxd', // Bassum
|
//'bug2014ilxd', // Bassum
|
||||||
//'bug2014gfzw', // Darmstadt
|
//'bug2014gfzw', // Darmstadt
|
||||||
//'bug2014datb', // Groningen
|
//'bug2014datb', // Groningen
|
||||||
'bug2013yvko', // Haltern 3.4
|
// 'bug2013yvko', // Haltern 3.4
|
||||||
'bug2015fdpy', // Darmstadt 3.0
|
// 'bug2015fdpy', // Darmstadt 3.0
|
||||||
|
// 'bug2016ajgm', // CTBT violation North Korea
|
||||||
|
// 'bug2016cqkd', // Taunusstein 2.5
|
||||||
|
// 'bug2016hdae', // Aldenhoven 2.6
|
||||||
|
// 'bug2016hdaj', // Aldenhoven 2.4
|
||||||
|
// 'bug2016kkrq', // Bottrop 3.3
|
||||||
|
// 'bug2016qphy', // Central Italy 6.1
|
||||||
|
// 'bug2016rslt', // CTBT violation North Korea
|
||||||
|
// 'bug2016ueqo', // Darmstadt 2.4
|
||||||
|
// 'bug2016ufpi', // Darmstadt 3.0
|
||||||
|
// 'bug2016vico', // Central Italy 6.5
|
||||||
|
// 'bug2016vrnc', // Nörvenich 3.2
|
||||||
|
// 'bug2016zawb', // St Goar 3.2
|
||||||
|
// 'bug2017iyhl', // Hürtgenwald 2.1
|
||||||
|
// 'bug2017omwg', // Brühl 2.3
|
||||||
|
// 'bug2017rfxe', // CTBT violation North Korea 6.1
|
||||||
|
// 'bug2017rjvq', // Dreieich / Hessen 2.6
|
||||||
|
// 'bug2017vxmm', // Brühl / Hürth 3.1
|
||||||
|
// 'bug2018nyax' // Ochtendung 2.7
|
||||||
|
// 'bug2019cxga', // Ochtendung 3.0
|
||||||
|
// 'bug2019czbt', // Ochtendung 2.9
|
||||||
|
// 'bug2019fura', // Sprengung Duisburg-Hochheide (Weißer Riese) 2.0
|
||||||
|
// 'bug2019yeij', // Tektonisch, Hambach 2.2
|
||||||
|
'bug2020fqxf' // Meckenheim, 2.5
|
||||||
];
|
];
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Load the stations using ajax */
|
/* Load the stations using ajax */
|
||||||
function loadStations(stime, etime) {
|
function loadStations(station, stime, etime) {
|
||||||
var mapBounds = map.getBounds();
|
var mapBounds = map.getBounds();
|
||||||
var N = mapBounds.getNorth();
|
var N = mapBounds.getNorth();
|
||||||
var E = mapBounds.getEast();
|
var E = mapBounds.getEast();
|
||||||
@ -37,15 +37,24 @@ function loadStations(stime, etime) {
|
|||||||
var etime = new Date();
|
var etime = new Date();
|
||||||
etime.setDate(etime.getDate()+1);
|
etime.setDate(etime.getDate()+1);
|
||||||
};
|
};
|
||||||
|
if ( !station ) {
|
||||||
var request_data = {
|
var request_data = {
|
||||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||||
level: 'channel',
|
level: 'station',
|
||||||
minlat: S-config['map']['latlngDelta'],
|
minlat: S-config['map']['latlngDelta'],
|
||||||
maxlat: N+config['map']['latlngDelta'],
|
maxlat: N+config['map']['latlngDelta'],
|
||||||
minlon: W-config['map']['latlngDelta'],
|
minlon: W-config['map']['latlngDelta'],
|
||||||
maxlon: E+config['map']['latlngDelta'],
|
maxlon: E+config['map']['latlngDelta'],
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
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: 'channel',
|
||||||
|
station: station,
|
||||||
|
};
|
||||||
|
};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: config['ajax']['stationURL'],
|
url: config['ajax']['stationURL'],
|
||||||
@ -61,13 +70,13 @@ function loadStations(stime, etime) {
|
|||||||
lng = $(this).find('Longitude:first').text(),
|
lng = $(this).find('Longitude:first').text(),
|
||||||
stationID = network+'_'+station,
|
stationID = network+'_'+station,
|
||||||
stationText = network+'.'+station;
|
stationText = network+'.'+station;
|
||||||
if ( !stationTable[stationID] ) {
|
if ( !stationTable[stationID] && $.inArray(stationID, config['station']['stationBlacklist']) <0 ) {
|
||||||
// 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', networkText[network] || '');
|
row += sprintf('<tr class="tablesorter-childRow station-details"><td colspan="4">%s', networkText[network] || '');
|
||||||
row += ( $.inArray(station, bochumStation)+1 ) ? '<br /><em>Betreiber:</em> Ruhr-Universität Bochum</td></tr>' : '</td></tr>' ;
|
row += ( $.inArray(station, bochumStation)+1 ) ? '<br /><em>Betreiber:</em> Ruhr-Universität Bochum</td></tr>' : '</td></tr>' ;
|
||||||
if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) {
|
if ( network == 'RN' || network == 'Z3' || network == '1A' || network == 'YD' || $.inArray(station, bochumStation)+1 ) {
|
||||||
// setting up station details (3rd line)
|
// setting up station details (3rd line)
|
||||||
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">';
|
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">';
|
||||||
row += stationDetails(station, network, lat, lng, stationID, stationText, $(this));
|
row += stationDetails(station, network, lat, lng, stationID, stationText, $(this));
|
||||||
@ -114,7 +123,16 @@ function loadStations(stime, etime) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// create stations csv download link
|
// create stations csv download link
|
||||||
request_data['format'] = 'text';
|
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',
|
||||||
|
minlat: S-config['map']['latlngDelta'],
|
||||||
|
maxlat: N+config['map']['latlngDelta'],
|
||||||
|
minlon: W-config['map']['latlngDelta'],
|
||||||
|
maxlon: E+config['map']['latlngDelta'],
|
||||||
|
format: 'text',
|
||||||
|
};
|
||||||
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -205,6 +223,20 @@ function initStationTable() {
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
loadStations();
|
loadStations();
|
||||||
|
loadStations('A100A');
|
||||||
|
loadStations('A101B');
|
||||||
|
loadStations('A102A');
|
||||||
|
loadStations('A103A');
|
||||||
|
loadStations('A103B');
|
||||||
|
loadStations('A104A');
|
||||||
|
loadStations('A104B');
|
||||||
|
loadStations('A105A');
|
||||||
|
loadStations('A106B');
|
||||||
|
loadStations('A107C');
|
||||||
|
loadStations('A108A');
|
||||||
|
loadStations('A109A');
|
||||||
|
// loadStations('KERA');
|
||||||
|
// loadStations('KARP');
|
||||||
// show / hide station info
|
// show / hide station info
|
||||||
$('#stationstable').delegate('.toggle', 'click' , function(){
|
$('#stationstable').delegate('.toggle', 'click' , function(){
|
||||||
// toggle visibility of selected row
|
// toggle visibility of selected row
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Load the stations using ajax */
|
/* Load the stations using ajax */
|
||||||
function loadStations(stime, etime) {
|
function loadStations(station, stime, etime) {
|
||||||
var mapBounds = map.getBounds();
|
var mapBounds = map.getBounds();
|
||||||
var N = mapBounds.getNorth();
|
var N = mapBounds.getNorth();
|
||||||
var E = mapBounds.getEast();
|
var E = mapBounds.getEast();
|
||||||
@ -37,15 +37,24 @@ function loadStations(stime, etime) {
|
|||||||
var etime = new Date();
|
var etime = new Date();
|
||||||
etime.setDate(etime.getDate()+1);
|
etime.setDate(etime.getDate()+1);
|
||||||
};
|
};
|
||||||
|
if ( !station ) {
|
||||||
var request_data = {
|
var request_data = {
|
||||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||||
level: 'channel',
|
level: 'station',
|
||||||
minlat: S-config['map']['latlngDelta'],
|
minlat: S-config['map']['latlngDelta'],
|
||||||
maxlat: N+config['map']['latlngDelta'],
|
maxlat: N+config['map']['latlngDelta'],
|
||||||
minlon: W-config['map']['latlngDelta'],
|
minlon: W-config['map']['latlngDelta'],
|
||||||
maxlon: E+config['map']['latlngDelta'],
|
maxlon: E+config['map']['latlngDelta'],
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
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: 'channel',
|
||||||
|
station: station,
|
||||||
|
};
|
||||||
|
};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: config['ajax']['stationURL'],
|
url: config['ajax']['stationURL'],
|
||||||
@ -61,13 +70,13 @@ function loadStations(stime, etime) {
|
|||||||
lng = $(this).find('Longitude:first').text(),
|
lng = $(this).find('Longitude:first').text(),
|
||||||
stationID = network+'_'+station,
|
stationID = network+'_'+station,
|
||||||
stationText = network+'.'+station;
|
stationText = network+'.'+station;
|
||||||
if ( !stationTable[stationID] ) {
|
if ( !stationTable[stationID] && $.inArray(stationID, config['station']['stationBlacklist']) <0 ) {
|
||||||
// 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', networkText[network] || '');
|
row += sprintf('<tr class="tablesorter-childRow station-details"><td colspan="4">%s', networkText[network] || '');
|
||||||
row += ( $.inArray(station, bochumStation)+1 ) ? '<br /><em>Operator:</em> Ruhr-University Bochum</td></tr>' : '</td></tr>' ;
|
row += ( $.inArray(station, bochumStation)+1 ) ? '<br /><em>Operator:</em> Ruhr-University Bochum, Germany</td></tr>' : '</td></tr>' ;
|
||||||
if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) {
|
if ( network == 'RN' || network == 'Z3' || network == '1A' || network == 'YD' || $.inArray(station, bochumStation)+1 ) {
|
||||||
// setting up station details (3rd line)
|
// setting up station details (3rd line)
|
||||||
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">';
|
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">';
|
||||||
row += stationDetails(station, network, lat, lng, stationID, stationText, $(this));
|
row += stationDetails(station, network, lat, lng, stationID, stationText, $(this));
|
||||||
@ -114,7 +123,16 @@ function loadStations(stime, etime) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// create stations csv download link
|
// create stations csv download link
|
||||||
request_data['format'] = 'text';
|
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',
|
||||||
|
minlat: S-config['map']['latlngDelta'],
|
||||||
|
maxlat: N+config['map']['latlngDelta'],
|
||||||
|
minlon: W-config['map']['latlngDelta'],
|
||||||
|
maxlon: E+config['map']['latlngDelta'],
|
||||||
|
format: 'text',
|
||||||
|
};
|
||||||
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -130,7 +148,7 @@ function stationDetails(station, network, lat, lng, stationId, stationText, stat
|
|||||||
var code = $(this).attr('code');
|
var code = $(this).attr('code');
|
||||||
var sensor = $(this).find('Sensor > Type').text().split(',')[0];
|
var sensor = $(this).find('Sensor > Type').text().split(',')[0];
|
||||||
var sampleRate = $(this).find('SampleRate').text();
|
var sampleRate = $(this).find('SampleRate').text();
|
||||||
output += '<br />Chanel ' + code + ', Samplingrate ' + sampleRate + ' Hz, Sensor ' + sensor;
|
output += '<br />Channel ' + code + ', Samplingrate ' + sampleRate + ' Hz, Sensor ' + sensor;
|
||||||
});
|
});
|
||||||
output += '</pre>';
|
output += '</pre>';
|
||||||
return output;
|
return output;
|
||||||
@ -205,6 +223,20 @@ function initStationTable() {
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
loadStations();
|
loadStations();
|
||||||
|
loadStations('A100A');
|
||||||
|
loadStations('A101B');
|
||||||
|
loadStations('A102A');
|
||||||
|
loadStations('A103A');
|
||||||
|
loadStations('A103B');
|
||||||
|
loadStations('A104A');
|
||||||
|
loadStations('A104B');
|
||||||
|
loadStations('A105A');
|
||||||
|
loadStations('A106B');
|
||||||
|
loadStations('A107C');
|
||||||
|
loadStations('A108A');
|
||||||
|
loadStations('A109A');
|
||||||
|
// loadStations('KERA');
|
||||||
|
// loadStations('KARP');
|
||||||
// show / hide station info
|
// show / hide station info
|
||||||
$('#stationstable').delegate('.toggle', 'click' , function(){
|
$('#stationstable').delegate('.toggle', 'click' , function(){
|
||||||
// toggle visibility of selected row
|
// toggle visibility of selected row
|
||||||
|
Loading…
Reference in New Issue
Block a user