Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fixed problem where entry would unselect if link was clicked

Beth Timmonsa21c18900122
diff --git a/css/events.css b/css/events.css
index 976c00f58..11b9a4d06 100644
--- a/css/events.css
+++ b/css/events.css
@@ -1,4 +1,4 @@
-.events{ display:inline-block; float:right; width: 210px; min-height:190px; padding-bottom:20px; /*box-shadow: 0 0 4px 1px #bbb;*/ background: rgba(38,43,49,0.65); font: 10px/12px "Gill Sans","helvetica",sans-serif; color: #141b4c; border-radius: 10px 0 0 10px; text-shadow:none;overflow:auto;}
+.events{ display:inline-block; float:right; width: 210px; min-height:190px; max-height:300px; padding-bottom:20px; /*box-shadow: 0 0 4px 1px #bbb;*/ background: rgba(38,43,49,0.65); font: 10px/12px "Gill Sans","helvetica",sans-serif; color: #141b4c; border-radius: 10px 0 0 10px; text-shadow:none;overflow:auto;}
.events h1,h2,h3,h4 {margin:0px; padding:0px;}
.events h2 {display:inline-block; float: left; color:#fffbe7; font-size: 14px; font-weight:100; border:none; padding:6px 0;}
.events h3 {display:inline-block; float: left; color:#fffb27; font-size: 12px; font-weight:100; border:none; text-decoration:none; }
@@ -28,7 +28,7 @@
/* entry list items */
.events li.item {
border:solid; border-width:3px; border-color:transparent;
- padding:0; display:block; width:192px; padding:8px 9px 8px 3px;
+ padding:0; display:block; width:192px; max-width:192px; padding:8px 9px 8px 3px;
background: -moz-linear-gradient(top, rgba(0,0,0,0.54) 0%, rgba(2,2,2,0.54) 1%, rgba(78,78,78,0.54) 50%, rgba(0,0,0,0.54) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.24)), color-stop(1%,rgba(2,2,2,0.24)), color-stop(50%,rgba(78,78,78,0.24)), color-stop(100%,rgba(0,0,0,0.24))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(0,0,0,0.24) 0%,rgba(2,2,2,0.24) 1%,rgba(78,78,78,0.24) 50%,rgba(0,0,0,0.24) 100%); /* Chrome10+,Safari5.1+ */
diff --git a/js/events.js b/js/events.js
index b8444ba98..8eca5006a 100644
--- a/js/events.js
+++ b/js/events.js
@@ -56,53 +56,96 @@ SOTE.widget.Events.handleMetaSuccess = function(arg) {
var self = arg;
// TODO: replace with actual JSON data
- // for now, hardcode 3 entries to play with
- var eTitle = "New Landsat Finds Clouds Hiding in Plain Sight";
- var eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81210&src=nhrss";
- var eCategory = "Crops and Drought/Unique Imagery";
- var eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81210/arasea_oli_2013083_tn.jpg";
- var eDescription = "One of LDCM&rsquo's sensors can detect faint cirrus clouds that can slightly alter a scene.";
- var eTime = "2013-03-24";
+ // for now, hardcode 4 entries to play with
+ var eTitle = "Tropical Cyclone Mahasen";
+ var eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81117&src=nhrss";
+ var eCategory = "Severe Storms";
+ var eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81117/mahasen_amo_2013133.jpg";
+ var eDescription = "Mahasen formed as a tropical storm over the northern Indian Ocean on May 10, 2013.";
+ var eTime = "2013-05-13";
var ePoint = "44.355 60.463";
+ var eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81117/mahasen_amo_2013133_geo.tif";
+ var eSatellite = "Terra";
+ var eInstr = "MODIS";
self.meta[0] = {title:eTitle,
link:eLink,
category:eCategory,
image:eImage,
description:eDescription,
date:eTime,
- point:ePoint};
+ point:ePoint,
+ geo:eGeoTiff,
+ sat:eSatellite,
+ instr:eInstr
+ };
- eTitle = "Pavlof Volcano, Alaska Peninsula";
- eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81205&src=nhrss";
- eCategory = "Volcanoes and Earthquakes";
- eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81205/ISS036-E-002105_tn.jpg";
- eDescription = "Three striking photographs of Pavlof Volcano reveal the three-dimensional structure of the eruption plume.";
- eTime = "2013-05-18";
+ eTitle = "Burning Fields near the Angara River";
+ eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81115;src=nhrss";
+ eCategory = "Fires";
+ eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81115/Russia_amo_2013130.0555.jpg";
+ eDescription = "Numerous fires were burning when the Moderate Resolution Imaging Spectroradiometer (MODIS) instrument on NASA’s Aqua satellite passed over the Irkutsk region on May 10, 2013.";
+ eTime = "2013-05-10";
ePoint = "55.418 -161.892";
+ eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81115/russia_amo_2013130_fires_geo.tif";
+ eSatellite = "Aqua";
+ eInstr = "MODIS";
self.meta[1] = {title:eTitle,
link:eLink,
category:eCategory,
image:eImage,
description:eDescription,
date:eTime,
- point:ePoint};
+ point:ePoint,
+ geo:eGeoTiff,
+ sat:eSatellite,
+ instr:eInstr
+ };
- eTitle = "Thunderstorms Spawn Tornado in Oklahoma";
- eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81200&src=nhrss";
- eCategory = "Severe Storms";
- eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81200/moore_goe_2013140_tn.jpg";
- eDescription = "Evolution of deadly storms over Oklahoma, viewed by GOES-East.";
- eTime = "2013-05-20";
+ eTitle = "Dust Storm on the Arabian Peninsula";
+ eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81092&src=nhrss";
+ eCategory = "Dust, Smoke, and Haze";
+ eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81092/sarabia_tmo_2013128.jpg";
+ eDescription = "A dust storm blew across the Arabian Peninsula in early May 2013. ";
+ eTime = "2013-05-08";
ePoint = "35.326 -97.482";
+ eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81092/sarabia_tmo_2013128_geo.tif";
+ eSatellite = "Terra";
+ eInstr = "MODIS";
self.meta[2] = {title:eTitle,
link:eLink,
category:eCategory,
image:eImage,
description:eDescription,
date:eTime,
- point:ePoint};
+ point:ePoint,
+ geo:eGeoTiff,
+ sat:eSatellite,
+ instr:eInstr
+ };
+
+ eTitle = "Springs Fire, California";
+ eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81049&src=nhrss";
+ eCategory = "Fires";
+ eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81049/California_tmo_2013122.jpg";
+ eDescription = "Fueled by hot, dry Santa Ana winds, several wildfires started in southern California in early May 2013.";
+ eTime = "2013-05-02";
+ ePoint = "35.326 -97.482";
+ eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81049/california_tmo_2013122_fires_geo.tif";
+ eSatellite = "Terra";
+ eInstr = "MODIS";
+ self.meta[3] = {title:eTitle,
+ link:eLink,
+ category:eCategory,
+ image:eImage,
+ description:eDescription,
+ date:eTime,
+ point:ePoint,
+ geo:eGeoTiff,
+ sat:eSatellite,
+ instr:eInstr
+ };
- self.metaLength = 3;
+ self.metaLength = 4;
self.render();
self.fire();
@@ -191,12 +234,14 @@ SOTE.widget.Events.prototype.render = function() {
var opacity = this.wvOpacity;
var epsg = this.wvEPSG;
- $('#eventList').delegate('li', 'click', function () {
+ $('#eventList').delegate('li', 'click', function (e) {
if($('#'+this.id).hasClass('sel')) {
- // unselect the item
- $('#'+this.id).removeClass('sel');
- this.innerHTML = this.basicHTML;
+ // unselect the item if something other than the link was clicked
+ if(e.target.tagName != "A") {
+ $('#'+this.id).removeClass('sel');
+ this.innerHTML = this.basicHTML;
+ }
}
else {
// select the event
@@ -215,7 +260,14 @@ SOTE.widget.Events.prototype.render = function() {
// generate permalink
//TODO: var link = "map="+map+"&products="+products+"&time="+time+"&switch="+s;
- var link = "time="+meta[ind].date;
+ var link = "";
+ if(meta[ind].sat === "Terra") {
+ link = "products=baselayers,MODIS_Terra_CorrectedReflectance_TrueColor";
+ }
+ else if(meta[ind].sat === "Aqua") {
+ link = "products=baselayers,MODIS_Aqua_CorrectedReflectance_TrueColor";
+ }
+ link += "&time="+meta[ind].date;
var initOrder = [
ss, // projection