diff --git a/js/tracker.js b/js/tracker.js index 26eeb9a..9f2eb0d 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -450,6 +450,10 @@ function load() { map.addLayer(launches); } + map.on('moveend', function (e) { + lhash_update(); + }); + map.on('baselayerchange', function (e) { selectedLayer = e.layer.id; }); @@ -496,7 +500,8 @@ function load() { var div = L.DomUtil.create('div'); div.innerHTML = ''; - + div.innerHTML.onload = setTimeValue(); + return div; }, @@ -561,6 +566,12 @@ function load() { }, 500); } +function setTimeValue() { + setTimeout(function() { + document.getElementById("timeperiod").value = wvar.mode; + }, 100); +} + function showLaunchSites() { if (!launches) { launches = new L.layerGroup([], {attribution: "© rs1729"});