Added config value for event marker colors. Added 'quarry blast' to event whitelist.

This commit is contained in:
Kasper D. Fischer 2014-05-08 09:08:48 +00:00
parent 02de112405
commit 882bd9aa14
Notes: subgit 2018-03-07 17:58:49 +01:00
r620 www/trunk
3 changed files with 17 additions and 15 deletions

View File

@ -242,12 +242,12 @@ function toggleFilteredMarkers() {
* other event is selected */
function highlightFirstEvent() {
var highlightStyle = {
color: 'red',
fillColor: '#f03',
color: config['event']['markerColorH'],
fillColor: config['event']['markerColorH'],
};
var normalStyle = {
fillColor: "#FFF500",
color: "#FFF500"
fillColor: config['event']['markerColor'],
color: config['event']['markerColor']
};
$("#eventstable a.map-link").each( function() {
if ( $(this).attr("eventid") ) {
@ -267,12 +267,12 @@ function highlightFirstEvent() {
function highlightEvent( id ) {
var highlightStyle = {
color: 'red',
fillColor: '#f03',
color: config['event']['markerColorH'],
fillColor: config['event']['markerColorH'],
};
var normalStyle = {
fillColor: "#FFF500",
color: "#FFF500"
fillColor: config['event']['markerColor'],
color: config['event']['markerColorH']
};
$("#eventstable > tbody > tr:not(.filtered)").find("a.map-link").each( function() {
if ( $(this).attr("eventid") ) {

View File

@ -43,8 +43,8 @@ function addStationMarker(id, lat, lng) {
/* add event marker */
function addEventMarker(id, lat, lng, mag) {
var markerOptions = {
fillColor: "#FFF500",
color: "#FFF500",
fillColor: config['event']['markerColor'],
color: config['event']['markerColor'],
weight: 1,
opacity: 1,
fillOpacity: config['event']['markerOpacity'],
@ -59,13 +59,13 @@ function addEventMarker(id, lat, lng, mag) {
function initMapLink() {
$("#eventstable > tbody > tr > td > a.map-link").on('click' , function(){
var highlightStyle = {
color: 'red',
fillColor: '#f03',
color: config['event']['markerColorH'],
fillColor: config['event']['markerColorH'],
className: $(this).attr('eventid')
}
var normalStyle = {
fillColor: "#FFF500",
color: "#FFF500"
fillColor: config['event']['markerColor'],
color: config['event']['markerColor']
};
// mark currently selected link and remove class selected from all other links
// set everything to normal state

View File

@ -87,9 +87,11 @@ var config = {
event: {
evaluationBlacklist: ['automatic', 'preliminary', 'rejected'],
markerOpacity: 0.3,
markerColor: '#FFD500',
markerColorH: '#FF0000',
minMag: 1.2,
minMagDelta: 0.1,
typeWhitelist: ['earthquake', 'induced or triggered event'],
typeWhitelist: ['earthquake', 'induced or triggered event', 'quarry blast'],
},
map: {
zoomDefault: 9,