Interactive interface for browsing global, full-resolution satellite imagery
Allow orbit tracks and firms to switch styles independently
ZachTRice1a0622306202
diff --git a/config/default/common/vectorstyles/OrbitTracks_CloudSat_Ascending.json b/config/default/common/vectorstyles/OrbitTracks_CloudSat_Ascending.jsonindex 3c4136e77..9dac38e36 100644--- a/config/default/common/vectorstyles/OrbitTracks_CloudSat_Ascending.json+++ b/config/default/common/vectorstyles/OrbitTracks_CloudSat_Ascending.json@@ -30,6 +30,25 @@"circle-color": "#ff0000"}},+ {+ "id": "default_style",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "yellow1","source": "OrbitTracks_CloudSat_Ascending",@@ -50,6 +69,25 @@"circle-color": "rgb(204, 255, 51)"}},+ {+ "id": "yellow1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "yellow2","source": "OrbitTracks_CloudSat_Ascending",@@ -70,6 +108,25 @@"circle-color": "rgb(248, 232, 35)"}},+ {+ "id": "yellow2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "orange1","source": "OrbitTracks_CloudSat_Ascending",@@ -90,6 +147,25 @@"circle-color": "rgb(242, 135, 34)"}},+ {+ "id": "orange1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "orange2","source": "OrbitTracks_CloudSat_Ascending",@@ -110,6 +186,25 @@"circle-color": "rgb(237, 209, 130)"}},+ {+ "id": "orange2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "orange3","source": "OrbitTracks_CloudSat_Ascending",@@ -130,6 +225,25 @@"circle-color": "rgb(216, 186, 25)"}},+ {+ "id": "orange3",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "red1","source": "OrbitTracks_CloudSat_Ascending",@@ -150,6 +264,25 @@"circle-color": "rgb(177, 89, 40)"}},+ {+ "id": "red1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "red2","source": "OrbitTracks_CloudSat_Ascending",@@ -170,6 +303,25 @@"circle-color": "rgb(196, 6, 41)"}},+ {+ "id": "red2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "red3","source": "OrbitTracks_CloudSat_Ascending",@@ -190,6 +342,25 @@"circle-color": "rgb(255, 69, 0)"}},+ {+ "id": "red3",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "pink1","source": "OrbitTracks_CloudSat_Ascending",@@ -210,6 +381,25 @@"circle-color": "rgb(255, 51, 204)"}},+ {+ "id": "pink1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "pink2","source": "OrbitTracks_CloudSat_Ascending",@@ -230,6 +420,25 @@"circle-color": "rgb(255, 204, 255)"}},+ {+ "id": "pink2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "pink3","source": "OrbitTracks_CloudSat_Ascending",@@ -250,6 +459,25 @@"circle-color": "rgb(255, 196, 198)"}},+ {+ "id": "pink3",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "pink4","source": "OrbitTracks_CloudSat_Ascending",@@ -270,6 +498,25 @@"circle-color": "rgb(219, 112, 147)"}},+ {+ "id": "pink4",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "pink5","source": "OrbitTracks_CloudSat_Ascending",@@ -290,6 +537,25 @@"circle-color": "rgb(255, 160, 122)"}},+ {+ "id": "pink5",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "purple1","source": "OrbitTracks_CloudSat_Ascending",@@ -310,6 +576,25 @@"circle-color": "rgb(178, 144, 193)"}},+ {+ "id": "purple1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "purple2","source": "OrbitTracks_CloudSat_Ascending",@@ -330,6 +615,25 @@"circle-color": "rgb(106, 61, 154)"}},+ {+ "id": "purple2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "purple3","source": "OrbitTracks_CloudSat_Ascending",@@ -350,6 +654,25 @@"circle-color": "rgb(192, 88, 240)"}},+ {+ "id": "purple3",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "blue1","source": "OrbitTracks_CloudSat_Ascending",@@ -370,6 +693,25 @@"circle-color": "rgb(136, 177, 191)"}},+ {+ "id": "blue1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "blue2","source": "OrbitTracks_CloudSat_Ascending",@@ -390,6 +732,25 @@"circle-color": "rgb(64, 244, 208)"}},+ {+ "id": "blue2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "blue3","source": "OrbitTracks_CloudSat_Ascending",@@ -410,6 +771,25 @@"circle-color": "rgb(126, 151, 189)"}},+ {+ "id": "blue3",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "blue4","source": "OrbitTracks_CloudSat_Ascending",@@ -430,6 +810,25 @@"circle-color": "rgb(102, 204, 204)"}},+ {+ "id": "blue4",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "blue5","source": "OrbitTracks_CloudSat_Ascending",@@ -450,6 +849,25 @@"circle-color": "rgb(25, 114, 243)"}},+ {+ "id": "blue5",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "blue6","source": "OrbitTracks_CloudSat_Ascending",@@ -470,6 +888,25 @@"circle-color": "rgb(21, 192, 230)"}},+ {+ "id": "blue6",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "brown1","source": "OrbitTracks_CloudSat_Ascending",@@ -490,6 +927,25 @@"circle-color": "rgb(153, 153, 0)"}},+ {+ "id": "brown1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "brown2","source": "OrbitTracks_CloudSat_Ascending",@@ -510,6 +966,25 @@"circle-color": "rgb(210, 136, 127)"}},+ {+ "id": "brown2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "green1","source": "OrbitTracks_CloudSat_Ascending",@@ -530,6 +1005,25 @@"circle-color": "rgb(22, 160, 133)"}},+ {+ "id": "green1",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "green2","source": "OrbitTracks_CloudSat_Ascending",@@ -550,6 +1044,25 @@"circle-color": "rgb(55, 242, 34)"}},+ {+ "id": "green2",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }+ },{"id": "green3","source": "OrbitTracks_CloudSat_Ascending",@@ -569,6 +1082,25 @@"circle-radius": "5","circle-color": "rgb(127, 196, 6)"}+ },+ {+ "id": "green3",+ "source": "OrbitTracks_CloudSat_Ascending",+ "source-layer": "OrbitTracks_CloudSat_Ascending",+ "type": "symbol",+ "layout": {+ "text-field": ["get", "label"],+ "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],+ "text-size": 10,+ "text-transform": "uppercase",+ "text-letter-spacing": 0.05,+ "text-offset": [-2.5, 0]+ },+ "paint": {+ "text-color": "#fff",+ "text-halo-color": "#999",+ "text-halo-width": 1+ }}]}diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.jsindex 1c9e2f460..7a7389608 100644--- a/web/js/map/layerbuilder.js+++ b/web/js/map/layerbuilder.js@@ -420,117 +420,93 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {document.getElementById('confidenceMaxFilterLabel').innerHTML = confidenceMaxFilter.value;};+ // TODO: Add check for date change and re-apply+ // TODO: Change this on chang to target the controls$(document).on('change', function(e) {glStyle = vectorStyles[vectorStyle];- styleFunction = stylefunction(layer, glStyle, 'default_style');- // FIRMS Style based on Confidence / FRP- if (document.getElementById('frpCheckbox').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'MODIS_Fire_Points_FRP');- } else if (document.getElementById('confidenceCheckbox').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'MODIS_Fire_Points_Confidence');- } else {+ if (glStyle.name === 'FIRMS') {styleFunction = stylefunction(layer, glStyle, 'default_style');- }- // FIRMS Filters- let confidenceMinFilter = document.getElementById('confidenceMinFilter');- let confidenceMaxFilter = document.getElementById('confidenceMaxFilter');+ // FIRMS Style based on Confidence / FRP+ if (document.getElementById('frpCheckbox').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'MODIS_Fire_Points_FRP');+ } else if (document.getElementById('confidenceCheckbox').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'MODIS_Fire_Points_Confidence');+ } else {+ styleFunction = stylefunction(layer, glStyle, 'default_style');+ }- document.getElementById('confidenceMinFilterLabel').innerHTML = confidenceMinFilter.value;- document.getElementById('confidenceMaxFilterLabel').innerHTML = confidenceMaxFilter.value;+ // FIRMS Filters+ let confidenceMinFilter = document.getElementById('confidenceMinFilter');+ let confidenceMaxFilter = document.getElementById('confidenceMaxFilter');- // Filter by a feature- layer.setStyle(function(feature, resolution) {- if (feature.get('CONFIDENCE') >= confidenceMinFilter.value && feature.get('CONFIDENCE') <= confidenceMaxFilter.value) {- return styleFunction(feature, resolution);- }- });+ document.getElementById('confidenceMinFilterLabel').innerHTML = confidenceMinFilter.value;+ document.getElementById('confidenceMaxFilterLabel').innerHTML = confidenceMaxFilter.value;- if (document.getElementById('orbit-track-controls_yellow1').checked === true) {- console.log('checked')- styleFunction = stylefunction(layer, glStyle, 'yellow1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_yellow2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'yellow2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_orange1').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'orange1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_orange2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'orange2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_orange3').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'orange3');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_red1').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'red1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_red2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'red2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_red3').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'red3');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_pink1').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'pink1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_pink2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'pink2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_pink3').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'pink3');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_pink4').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'pink4');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_pink5').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'pink5');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_purple1').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'purple1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_purple2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'purple2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_purple3').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'purple3');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_blue1').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'blue1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_blue2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'blue2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_blue3').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'blue3');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_blue4').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'blue4');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_blue5').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'blue5');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_blue6').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'blue6');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_brown1').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'brown1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_brown2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'brown2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_green1').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'green1');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_green2').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'green2');- return styleFunction;- } else if (document.getElementById('orbit-track-controls_green3').checked === true) {- styleFunction = stylefunction(layer, glStyle, 'green3');- return styleFunction;- } else {- styleFunction = stylefunction(layer, glStyle, 'default_style');- return styleFunction;+ // Filter by a feature+ layer.setStyle(function(feature, resolution) {+ if (feature.get('CONFIDENCE') >= confidenceMinFilter.value && feature.get('CONFIDENCE') <= confidenceMaxFilter.value) {+ return styleFunction(feature, resolution);+ }+ });+ } else if (glStyle.name === 'Orbit Tracks') {+ if (document.getElementById('orbit-track-controls_yellow1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'yellow1');+ } else if (document.getElementById('orbit-track-controls_yellow2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'yellow2');+ } else if (document.getElementById('orbit-track-controls_orange1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'orange1');+ } else if (document.getElementById('orbit-track-controls_orange2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'orange2');+ } else if (document.getElementById('orbit-track-controls_orange3').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'orange3');+ } else if (document.getElementById('orbit-track-controls_red1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'red1');+ } else if (document.getElementById('orbit-track-controls_red2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'red2');+ } else if (document.getElementById('orbit-track-controls_red3').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'red3');+ } else if (document.getElementById('orbit-track-controls_pink1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'pink1');+ } else if (document.getElementById('orbit-track-controls_pink2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'pink2');+ } else if (document.getElementById('orbit-track-controls_pink3').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'pink3');+ } else if (document.getElementById('orbit-track-controls_pink4').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'pink4');+ } else if (document.getElementById('orbit-track-controls_pink5').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'pink5');+ } else if (document.getElementById('orbit-track-controls_purple1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'purple1');+ } else if (document.getElementById('orbit-track-controls_purple2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'purple2');+ } else if (document.getElementById('orbit-track-controls_purple3').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'purple3');+ } else if (document.getElementById('orbit-track-controls_blue1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'blue1');+ } else if (document.getElementById('orbit-track-controls_blue2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'blue2');+ } else if (document.getElementById('orbit-track-controls_blue3').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'blue3');+ } else if (document.getElementById('orbit-track-controls_blue4').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'blue4');+ } else if (document.getElementById('orbit-track-controls_blue5').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'blue5');+ } else if (document.getElementById('orbit-track-controls_blue6').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'blue6');+ } else if (document.getElementById('orbit-track-controls_brown1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'brown1');+ } else if (document.getElementById('orbit-track-controls_brown2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'brown2');+ } else if (document.getElementById('orbit-track-controls_green1').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'green1');+ } else if (document.getElementById('orbit-track-controls_green2').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'green2');+ } else if (document.getElementById('orbit-track-controls_green3').checked === true) {+ styleFunction = stylefunction(layer, glStyle, 'green3');+ } else {+ styleFunction = stylefunction(layer, glStyle, 'default_style');+ }}});});