Interactive interface for browsing global, full-resolution satellite imagery
Data download shows granules after projection switch
Mike McGannc554cd27a969
diff --git a/src/js/data/wv.data.model.js b/src/js/data/wv.data.model.jsindex 064b7f84b..5a6657aef 100644--- a/src/js/data/wv.data.model.js+++ b/src/js/data/wv.data.model.js@@ -99,7 +99,7 @@ wv.data.model = wv.data.model || function(models, config) {var init = function() {models.layers.events.on("change", updateLayers);- models.proj.events.on("select", updateProjection);+ //models.proj.events.on("select", updateProjection);models.date.events.on("select", updateDate);updateLayers();updateProjection();@@ -421,9 +421,11 @@ wv.data.model = wv.data.model || function(models, config) {self.projection = models.proj.selected.id;self.crs = models.proj.selected.crs;self.events.trigger("projectionUpdate");+ updateLayers();query();- //self.selectProduct(null);};+ // FIXME: This is a hack+ self.updateProjection = updateProjection;var updateDate = function() {self.time = models.date.selected;@@ -432,9 +434,7 @@ wv.data.model = wv.data.model || function(models, config) {var findAvailableProduct = function() {var foundProduct = null;- var list = models.layers.active.baselayers.concat(- models.layers.active.overlays- );+ var list = models.layers.get({flat: true});// Find the top most layer that has a product entry in ECHOfor ( var i = list.length - 1; i >= 0; i-- ) {diff --git a/src/js/map/wv.map.model.js b/src/js/map/wv.map.model.jsindex 080f73ea0..112765a63 100644--- a/src/js/map/wv.map.model.js+++ b/src/js/map/wv.map.model.js@@ -33,6 +33,8 @@ wv.map.model = wv.map.model || function(models, config) {*/self.config = config;+ self.events = wv.util.events();+var init = function() {self.config = validateConfig(self.config);self.maps = wv.map.set(containerId, self.config, self);@@ -125,6 +127,7 @@ wv.map.model = wv.map.model || function(models, config) {var visible = models.layers.visible;self.maps.set(layers, visible);self.maps.setPalettes(models.palettes.active);+ self.events.trigger("projection");};var onDateSelect = function() {diff --git a/src/js/wv.main.js b/src/js/wv.main.jsindex 53f263c6f..8b6359a1a 100644--- a/src/js/wv.main.js+++ b/src/js/wv.main.js@@ -117,6 +117,7 @@ $(function() {ui.rubberband = wv.image.rubberband(models, config);ui.image = wv.image.panel(models, ui, config);ui.data = wv.data.ui(models, config, map.maps);+ // FIXME: Why is this here?ui.data.render();ui.link = wv.link.ui(models);@@ -149,6 +150,8 @@ $(function() {.on("zoomEnd", function(map) {ui.data.onViewChange(map);});+ // FIXME: This is a hack+ models.map.events.on("projection", models.data.updateProjection);// Console notificationsif ( wv.brand.release() ) {