Interactive interface for browsing global, full-resolution satellite imagery
Removed empty layer -- fixed issues when all layers were hidden
Mike McGanncd1fc348b48b
diff --git a/data/antarctic_ap_products.php b/data/antarctic_ap_products.phpindex 3f9244f72..89ea4facd 100644--- a/data/antarctic_ap_products.php+++ b/data/antarctic_ap_products.php@@ -32,12 +32,6 @@"value"=> "MODIS_Aqua_CorrectedReflectance_Bands721","type" => "single", "category" => "baselayers"),- array(- "label"=> "Empty",- "sublabel"=> "",- "value"=> "NON_EXISTENT_LAYER",- "type" => "single", "category" => "baselayers"- ),array("label"=> "Sea Ice","sublabel"=> "Terra / MODIS",diff --git a/data/arctic_ap_products.php b/data/arctic_ap_products.phpindex eacfc9b05..85935684d 100644--- a/data/arctic_ap_products.php+++ b/data/arctic_ap_products.php@@ -36,13 +36,6 @@"type" => "single", "category" => "baselayers"),- array(- "label"=> "Empty",- "sublabel"=> "",- "value"=> "NON_EXISTENT_LAYER",- "type" => "single", "category" => "baselayers"-- ),array("label"=> "Sea Ice","sublabel"=> "Terra / MODIS",diff --git a/data/geographic_ap_products.php b/data/geographic_ap_products.phpindex d2c89d704..c71c88777 100644--- a/data/geographic_ap_products.php+++ b/data/geographic_ap_products.php@@ -1017,12 +1017,6 @@"All" => array(- array(- "label" => "Empty",- "sublabel" => "",- "value" => "NON_EXISTENT_LAYER",- "type" => "single", "category" => "baselayers"- ),array("label" => "Corrected Reflectance (True Color)","sublabel" => "Terra / MODIS",@@ -1614,12 +1608,6 @@),"Other" => array(- array(- "label" => "Empty",- "sublabel" => "",- "value" => "NON_EXISTENT_LAYER",- "type" => "single", "category" => "baselayers"- ),array("label" => "Earth at Night 2012","sublabel" => "Suomi NPP / VIIRS via NASA Earth Observatory",diff --git a/js/Worldview/Map/ProductMap.js b/js/Worldview/Map/ProductMap.jsindex f2ecf6a85..5ca7a5912 100644--- a/js/Worldview/Map/ProductMap.js+++ b/js/Worldview/Map/ProductMap.js@@ -226,10 +226,12 @@ Worldview.Map.ProductMap = function(containerId, mapConfig, component) {} else {newProducts.push(product);}- if ( $.inArray(product, hiddenProducts) >= 0 ) {- self.map.products[product].setVisibility(false);- } else {- self.map.products[product].setVisibility(true);+ if ( self.map.products[product] ) {+ if ( $.inArray(product, hiddenProducts) >= 0 ) {+ self.map.products[product].setVisibility(false);+ } else {+ self.map.products[product].setVisibility(true);+ }}});$.each(self.products, function(index, product) {diff --git a/js/bank.js b/js/bank.jsindex 044ea2bd2..7cbf411a5 100644--- a/js/bank.js+++ b/js/bank.js@@ -246,7 +246,7 @@ SOTE.widget.Bank.prototype.render = function(){m.paletteString = paletteString;item.innerHTML += paletteString;}*/- if(m.palette){+ if(m && m.palette){var paletteString = "<div><span class='palette'><span class='p-min' style='margin-right:10px;'>"+m.min+"</span>" +"<canvas class='colorBar' id='canvas"+this.values[formattedCategoryName.toLowerCase()][j].value+"' width=100px height=14px'></canvas>" +"<span class='p-max' style='margin-left:10px;'>"+m.max+"</span>";@@ -327,7 +327,7 @@ SOTE.widget.Bank.prototype.renderCanvases = function(){for(var j=0; j<this.values[formattedCategoryName.toLowerCase()].length; j++){var val = this.values[formattedCategoryName.toLowerCase()][j].value;var m = this.meta[this.values[formattedCategoryName.toLowerCase()][j].value];- if(m.palette){+ if(m && m.palette){var width = 100/m.palette.length;var canvas = document.getElementById("canvas"+val);if ( m.palette.stops.length > 1 ) {