Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Additional docs and WV-408, fixed nonce issue with TileWorker.js

Mike McGann07a450ea4027
diff --git a/build.xml b/build.xml
index 59b9fd730..96515262b 100644
--- a/build.xml
+++ b/build.xml
@@ -140,6 +140,7 @@
value="${build.nonce}">
<fileset dir="${build.web.dir}" includes="*.html"/>
<fileset dir="${build.web.dir}/pages" includes="*.html"/>
+ <fileset dir="${build.web.dir}/js" includes="**/*.js"/>
</replace>
<!-- Debug version that is not minified -->
diff --git a/src/js/Date.js b/src/js/Date.js
index adde29b94..6832f5dee 100644
--- a/src/js/Date.js
+++ b/src/js/Date.js
@@ -9,6 +9,10 @@
* All Rights Reserved.
*/
+/**
+ * @module Date
+ */
+
/**
* Date handling utilities.
*
diff --git a/src/js/Worldview/About.js b/src/js/Worldview/About.js
index 62ca4ef56..c4e2255bc 100644
--- a/src/js/Worldview/About.js
+++ b/src/js/Worldview/About.js
@@ -10,21 +10,29 @@
*/
/**
- * Namespace: Worldview.Palette
- * Visualization of science data.
+ * @module Worldview
*/
-
-//=============================================================================
-// NOTE: pages/about.html MUST also be updated!
-//=============================================================================
-
Worldview.namespace("About");
+/**
+ * Displays the Worldview about box. If this is a desktop device, a full
+ * dialog box is shown with all the relevant information. If this is a mobile
+ * device, a small dialog box is shown with links to a page that contains
+ * the full information.
+ *
+ * @class About
+ * @static
+ */
$(function() {
var ns = Worldview.About;
var overlay;
+ /**
+ * Show the about dialog box.
+ *
+ * @method show
+ */
ns.show = function() {
if ( $(window).width() < 750 ) {
showMobile();
@@ -35,8 +43,15 @@ $(function() {
var showDesktop = function() {
if ( !overlay ) {
- overlay = new YAHOO.widget.Panel("panel1", { zIndex:1020, visible:false } );
- var item = "<div >"+
+ overlay = new YAHOO.widget.Panel("panel1", {
+ zIndex:1020,
+ visible:false
+ });
+
+ //=============================================================
+ // NOTE: pages/about.html MUST also be updated!
+ //=============================================================
+ var item = "<div >"+
"<h3>Welcome to Worldview</h3>"+
"<p>This tool from NASA's <a href='http://earthdata.nasa.gov/about-eosdis' target='_blank'>EOSDIS</a> provides the capability to interactively browse full-resolution, global, near real-time satellite imagery from 50+ data products from <a href='http://lance.nasa.gov/' target='_blank'>LANCE</a>. In essence, this shows the entire Earth as it looks \"right now\" - or at least as it has looked within the past few hours. This supports time-critical application areas such as wildfire management, air quality measurements, and weather forecasting. The data is generally available within three hours of observation and can be compared to observations since May 2012 - just click or drag the blue time sliders at the bottom of the screen to change the currently-displayed date. Arctic and Antarctic projections of several products are also available for a \"full globe\" perspective. Browsing on tablet devices is currently supported (iPad 2+ recommended) for mobile access. Please note, however, that this is an alpha (preview) release and many features are still under development.</p>"+
"<br /><p>Worldview uses the newly-developed <a href='http://earthdata.nasa.gov/gibs' target='_blank'>Global Image Browse Services (GIBS)</a> to rapidly retrieve its full-resolution imagery to provide an interactive browsing experience. While Worldview uses <a href='http://openlayers.org/' target='_blank'>OpenLayers</a> as its mapping library, GIBS also supports Google Earth, NASA World Wind, and several other clients. We encourage interested developers to build their own clients or integrate NASA imagery into their existing ones using these services.</p>"+
diff --git a/src/js/Worldview/Events.js b/src/js/Worldview/Events.js
index f9e440a9b..578b30578 100644
--- a/src/js/Worldview/Events.js
+++ b/src/js/Worldview/Events.js
@@ -9,6 +9,10 @@
* All Rights Reserved.
*/
+/**
+ * @module Worldview
+ */
+
/**
* General event pump.
*
@@ -25,7 +29,6 @@
*
* events.fire("answerReceived", 42);
*
- * @module Worldview
* @class Events
*/
Worldview.Events = function() {
diff --git a/src/js/Worldview/Map.js b/src/js/Worldview/Map.js
index 7551c9ca9..2fc7dc1dc 100644
--- a/src/js/Worldview/Map.js
+++ b/src/js/Worldview/Map.js
@@ -10,26 +10,36 @@
*/
/**
- * Namespace: Worldview.Map
- * Worldview specific code when using OpenLayers.
+ * @module Worldview
*/
Worldview.namespace("Map");
+/**
+ * Utilities for OpenLayers
+ *
+ * @class Map
+ * @static
+ */
+
$(function(ns) {
var logPosition = Logging.getLogger("Worldview.Map.Position");
+ // Used to reference the TileWorker
+ var BUILD_NONCE = "@BUILD_NONCE@";
+
/**
- * Constant: COORDINATE_CONTROLS
- * An object that contains OpenLayers.Contorl.MousePosition objects
+ * An object that contains OpenLayers.Control.MousePosition objects
* that update the current latitude/longitude values on the map as the
* mouse moves. Keyed by projection name, either "geographic", "arctic",
* or "antarctic".
*
* Example:
- * (begin code)
- * var contorl = Worldview.Map.COORDINATE_CONTROLS["geographic"];
- * (end code)
+ *
+ * var control = Worldview.Map.COORDINATE_CONTROLS["geographic"];
+ *
+ * @attribute COORDINATE_CONTROLS
+ * @final
*/
ns.COORDINATE_CONTROLS = {
"geographic": new OpenLayers.Control.MousePosition({
@@ -68,14 +78,15 @@ $(function(ns) {
};
/**
- * Function: isExtentValid
* Determines if an exent object contains valid values.
*
- * Parameters:
- * extent - An OpenLayers.Bound ojbect
+ * @method isExtentValid
+ * @static
*
- * Returns:
- * False if any of the values is NaN, otherwise returns true.
+ * @param extent {OpenLayers.Bound} The extent to check.
+ *
+ * @return {boolean} False if any of the values is NaN, otherwise returns
+ * true.
*/
ns.isExtentValid = function(extent) {
if ( extent === undefined ) {
@@ -91,10 +102,16 @@ $(function(ns) {
};
/**
- * Property: tileScheduler
- * Scheduler used to render canvas tiles. Must be initialized on startup.
+ * Scheduler used to render canvas tiles.
+ *
+ * @attribute tileScheduler {Scheduler}
+ * @static
+ * @readOnly
*/
- ns.tileScheduler = null;
+ ns.tileScheduler = Worldview.Scheduler({
+ script: "js/Worldview/Map/TileWorker.js?v=" + BUILD_NONCE,
+ max: 4
+ });
/**
* Function: setOpacity
diff --git a/src/js/main.js b/src/js/main.js
index 2e2f40b60..4342f6e88 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -89,11 +89,6 @@ $(function() {// Initialize "static" vars
checkMobile();
//console.log("init");
- Worldview.Map.tileScheduler = Worldview.Scheduler({
- script: "js/Worldview/Map/TileWorker.js?v=" +
- Worldview.BUILD_TIMESTAMP,
- max: 4
- });
//$('#products').tabs();