Title | menus | layout | classes | ||||||
---|---|---|---|---|---|---|---|---|---|
Home |
|
splash |
wide |
' + (props ? '' + props.name + '
' : 'Hover over an area'); }; function mouseOverFeature(feature, layer) { layer.on({ mouseover: function(e) { var layer = e.target; info.update(layer.feature.properties); }, mouseout: function(e) { info.update(); } }); } var legend = L.control({position: 'bottomleft'}); legend.onAdd = function (map) { var div = L.DomUtil.create('div', 'info legend'), grades = [0, 10, 20, 50, 100, 200, 500, 1000], labels = []; div.innerHTML = '' + ' Synchronous Measurements
' + '' + ' Standalone Measurements
' + '' + ' TSO Open Data Measurements
'+ '' + '/' + '' + ' Independent Measurements'; return div; }; legend.addTo(map); info.addTo(map); // Slider var slider = document.getElementById('slider'); noUiSlider.create(slider, { start: [2011, 2021], // Handle start position connect: true, // Display a colored bar between the handles step: 1, // Steps shown, i.e., year by year behaviour: 'tap-drag', // Move handle on tap, bar is draggable range: { // Slider can select '0' to '100' 'min': 2011, 'max': 2021 }, pips: { // Show a scale with the slider mode: 'steps', density: 6, } }); slider.noUiSlider.on('update', function (values, handle) { let new_times = slider.noUiSlider.get(true); Object.keys(years).forEach(function (item, index) { map.removeLayer(years[item]); }); Object.keys(years).forEach(function (item, index) { if ( new_times[0] <= parseInt(item) && new_times[1] >= parseInt(item)) { map.addLayer(years[item]); }; }); }); </script>
{% include_relative details.md %}