diff --git a/config.json.example b/config.json.example index 9ff9799..fbe1a37 100644 --- a/config.json.example +++ b/config.json.example @@ -8,6 +8,7 @@ "mapSigmaScale": 0.5, "showContact": true, "maxAge": 14, + "blinkingHours": 8, "mapLayers": [ { "name": "MapQuest", "url": "https://otile{s}-s.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg", diff --git a/lib/map.js b/lib/map.js index 8742331..dabae33 100644 --- a/lib/map.js +++ b/lib/map.js @@ -2,8 +2,6 @@ define(["map/clientlayer", "map/labelslayer", "d3", "leaflet", "moment", "locationmarker", "rbush", "leaflet.label", "leaflet.providers"], function (ClientLayer, LabelsLayer, d3, L, moment, LocationMarker, rbush) { - var blinkingHours = 8 - var options = { worldCopyJump: true, zoomControl: false } @@ -455,7 +453,7 @@ define(["map/clientlayer", "map/labelslayer", var markersLost = data.nodes.lost.filter(has_location) .map(mkMarker(nodeDict, function (d) { - if (d.lastseen.isAfter(moment(data.now).subtract(blinkingHours, "hours"))) + if (d.lastseen.isAfter(moment(data.now).subtract(config.blinkingHours, "hours"))) return iconAlert return iconLost