Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Fixed the following two critical bugs for the 0.3.0 release: - when in polar mode and image download is attempted, the (correct) warning message appears that polar imagery download isn't yet supported, but then it still goes into image download mode and is difficult to escape it -Image download doesn't correctly pass the date to the image download script in Mac Safari and iPad - looks like it has to do with Date parsing

Tilak Joshi245814d7773e
diff --git a/js/imageDownload.js b/js/imageDownload.js
index de9078bd4..55f28bc6b 100644
--- a/js/imageDownload.js
+++ b/js/imageDownload.js
@@ -186,7 +186,11 @@ SOTE.widget.ImageDownload.prototype.updateComponent = function(qs){
var dlURL = "http://map2.vis.earthdata.nasa.gov/imagegen/?";
- var dTime = new Date((time.split("T"))[0]+"T00:00:00");
+ //var dTime = new Date((time.split(/T/))[0]+"T00:00:00");
+ var dTime = SOTE.util.UTCDateFromISO8601String(time);
+ dTime.setHours(0);
+ dTime.setMinutes(0);
+ dTime.setSeconds(0);
//Julian date, padded with two zeros (to ensure the julian date is always in DDD format).
var jDate = "00" + (1+Math.ceil((dTime - new Date(dTime.getFullYear(),0,1)) / 86400000));
diff --git a/js/rubberBand.js b/js/rubberBand.js
index d1c6d3caa..a3e393098 100644
--- a/js/rubberBand.js
+++ b/js/rubberBand.js
@@ -63,18 +63,21 @@ SOTE.widget.RubberBand.prototype.init = function(){
SOTE.widget.RubberBand.toggle = function(o){
var self = o.data.self;
- if(self.state == "off"){
+ if(self.state == "off" && self.projectionSwitch == "geographic"){
self.state = "on";
$("#"+self.id+"camera_link img").attr("src",self.onicon);
$("#imagedownload").show('slide', {direction: 'up'}, 1000);
self.draw();
}
- else{
+ else if(self.projectionSwitch == "geographic"){
self.state = "off";
$("#"+self.id+"camera_link img").attr("src",self.icon);
self.jcropAPI.destroy();
$("#imagedownload").hide('slide', {direction: 'up'}, 1000);
}
+ else {
+ SOTE.util.throwError("The download feature is currently available for geograpic projection only.");
+ }
}
/**
@@ -192,11 +195,6 @@ SOTE.widget.RubberBand.prototype.getStatus = function(){
*/
SOTE.widget.RubberBand.prototype.draw = function() {
- if(this.projectionSwitch !="geographic"){
- alert("The download feature is currently available for geograpic projection only.");
- return -1;
- }
-
var self = this;
$("#"+this.cropee).Jcrop({