Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

overhauled the way product layers are added to map; instead of preloading all layers on startup, they're only added on demand

Ryan Boller44f88022259f
diff --git a/js/mapSote.js b/js/mapSote.js
index 7abea7ddd..bd8e216c6 100644
--- a/js/mapSote.js
+++ b/js/mapSote.js
@@ -31,13 +31,13 @@ SOTE.widget.MapSote = function(containerId, config)
this.isLayerCachingEnabled = false;
this.terribleQsSaver = "";
this.terribleQsSaverJustSet = false;
+ this.terribleProductListSaver = "";
this.state = "geographic";
this.setExtent(this.bbox);
// Register MapSote-specific callbacks etc
- this.initMapSote();
-
+ this.initMapSote();
};
@@ -49,6 +49,7 @@ SOTE.widget.MapSote.prototype.initMapSote = function()
this.isLayerCachingEnabled = false;
this.terribleQsSaver = "";
this.terribleQsSaverJustSet = false;
+ this.terribleProductListSaver = "";
// Register callbacks for when movement begins and zoom ends
@@ -57,6 +58,35 @@ SOTE.widget.MapSote.prototype.initMapSote = function()
// Force "zoom end" for widget init
this.handleMapZoomEnd(null);
+
+
+ // Recenter map
+ if (this.projection == "EPSG:4326")
+ {
+ // Set default extent according to time of day:
+ // at 00:00 UTC, start at far eastern edge of map: "20.6015625,-46.546875,179.9296875,53.015625"
+ // at 23:00 UTC, start at far western edge of map: "-179.9296875,-46.546875,-20.6015625,53.015625"
+ var curHour = new Date().getUTCHours();
+
+ // For earlier hours when data is still being filled in, force a far eastern perspective
+ if (curHour < 9)
+ curHour = 0;
+
+ // Compute east/west bounds
+ var minLon = 20.6015625 + curHour * (-200.53125/23.0);
+ var maxLon = minLon + 159.328125;
+
+ var bbox = minLon.toString() + ",-46.546875,"+maxLon.toString()+",53.015625";
+
+ //this.setExtent("-146.390625,-93.921875,146.390625,93.953125",true);
+ this.setExtent(bbox,true);
+ this.fire();
+ }
+ else
+ {
+ this.setExtent("-4194304,-4194304,4194304,4194304",true);
+ this.fire();
+ }
}
@@ -128,21 +158,187 @@ SOTE.widget.MapSote.prototype.handleMapZoomEnd = function(evt)
}
/**
- * Change the base layers based on dependencies (i.e. extent, date, data product)
- *
- * Update component with QS.
- *
- * @this {map}
- * @param {String} querystring contains all values of dependencies (from registry)
- * @returns {boolean} true or false depending on if the component still validates with the new criteria
- *
-*/
-SOTE.widget.MapSote.prototype.updateComponent = function(querystring)
-{
-
+ * Adds product to map object by creating a separate layer for that product for each accessible date
+ *
+ * @param product the product name
+ * @param state the current projection state
+ */
+SOTE.widget.MapSote.prototype.addProductToMap = function(product, state)
+{
+ var layersToAdd = [];
+
+ if(this.state == "geographic")
+ {
+ layersToAdd = [
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_CorrectedReflectance_TrueColor", "MODIS_Terra_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_SurfaceReflectance_Bands143", "MODIS_Terra_SurfaceReflectance_Bands143", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_CorrectedReflectance_TrueColor", "MODIS_Aqua_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_SurfaceReflectance_Bands143", "MODIS_Aqua_SurfaceReflectance_Bands143", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_CorrectedReflectance_Bands721", "MODIS_Terra_CorrectedReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_CorrectedReflectance_Bands721", "MODIS_Aqua_CorrectedReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_SurfaceReflectance_Bands721", "MODIS_Terra_SurfaceReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_SurfaceReflectance_Bands721", "MODIS_Aqua_SurfaceReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_CorrectedReflectance_Bands367", "MODIS_Terra_CorrectedReflectance_Bands367", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_SurfaceReflectance_Bands121", "MODIS_Terra_SurfaceReflectance_Bands121", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_250m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_SurfaceReflectance_Bands121", "MODIS_Aqua_SurfaceReflectance_Bands121", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_250m),
+
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Data_No_Data", "MODIS_Terra_Data_No_Data", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Data_No_Data", "MODIS_Aqua_Data_No_Data", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Snow_Cover", "MODIS_Terra_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Snow_Cover", "MODIS_Aqua_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Sea_Ice", "MODIS_Terra_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Sea_Ice", "MODIS_Aqua_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Land_Surface_Temp_Day", "MODIS_Terra_Land_Surface_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Land_Surface_Temp_Day", "MODIS_Aqua_Land_Surface_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Land_Surface_Temp_Night", "MODIS_Terra_Land_Surface_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Land_Surface_Temp_Night", "MODIS_Aqua_Land_Surface_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Brightness_Temp_Band31_Day", "MODIS_Terra_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Brightness_Temp_Band31_Day", "MODIS_Aqua_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Brightness_Temp_Band31_Night", "MODIS_Terra_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Brightness_Temp_Band31_Night", "MODIS_Aqua_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Aerosol", "MODIS_Terra_Aerosol", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Aerosol", "MODIS_Aqua_Aerosol", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Water_Vapor_5km_Day", "MODIS_Terra_Water_Vapor_5km_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Water_Vapor_5km_Day", "MODIS_Aqua_Water_Vapor_5km_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Water_Vapor_5km_Night", "MODIS_Terra_Water_Vapor_5km_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Water_Vapor_5km_Night", "MODIS_Aqua_Water_Vapor_5km_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Cloud_Top_Pressure_Day", "MODIS_Terra_Cloud_Top_Pressure_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Cloud_Top_Pressure_Day", "MODIS_Aqua_Cloud_Top_Pressure_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Cloud_Top_Pressure_Night", "MODIS_Terra_Cloud_Top_Pressure_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Cloud_Top_Pressure_Night", "MODIS_Aqua_Cloud_Top_Pressure_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Cloud_Top_Temp_Day", "MODIS_Terra_Cloud_Top_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Cloud_Top_Temp_Day", "MODIS_Aqua_Cloud_Top_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Terra_Cloud_Top_Temp_Night", "MODIS_Terra_Cloud_Top_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "MODIS_Aqua_Cloud_Top_Temp_Night", "MODIS_Aqua_Cloud_Top_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "AIRS_Dust_Score", "AIRS_Dust_Score", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "AIRS_CO_Total_Column_Day", "AIRS_CO_Total_Column_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "AIRS_CO_Total_Column_Night", "AIRS_CO_Total_Column_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "AIRS_Prata_SO2_Index_Day", "AIRS_Prata_SO2_Index_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "AIRS_Prata_SO2_Index_Night", "AIRS_Prata_SO2_Index_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "AIRS_Precipitation_Day", "AIRS_Precipitation_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "AIRS_Precipitation_Night", "AIRS_Precipitation_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_Cloud_Pressure", "OMI_Cloud_Pressure", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_Aerosol_Index", "OMI_Aerosol_Index", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_Aerosol_Optical_Depth", "OMI_Aerosol_Optical_Depth", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_Absorbing_Aerosol_Optical_Depth", "OMI_Absorbing_Aerosol_Optical_Depth", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_SO2_Lower_Troposphere", "OMI_SO2_Lower_Troposphere", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_SO2_Middle_Troposphere", "OMI_SO2_Middle_Troposphere", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_SO2_Upper_Troposphere_and_Stratosphere", "OMI_SO2_Upper_Troposphere_and_Stratosphere", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OMI_SO2_Planetary_Boundary_Layer", "OMI_SO2_Planetary_Boundary_Layer", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
+
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OBPG_MODIS_Aqua_Chlorophyll_A", "OBPG_MODIS_Aqua_Chlorophyll_A", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+ SOTE.util.generateProductLayersForDateRangeTMS(product, "OBPG_SeaSurfaceTemperature_11_Day", "OBPG_SeaSurfaceTemperature_11_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+
+ SOTE.util.generateWmsProductLayersForDateRange(product, "MODIS_Fires_All", "MODIS_Fires_All", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "MODIS_Fires_Terra", "MODIS_Fires_Terra", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "MODIS_Fires_Aqua", "MODIS_Fires_Aqua", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "Terra_Orbit_Asc", "Terra_Orbit_Asc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "Terra_Orbit_Dsc", "Terra_Orbit_Dsc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "Aqua_Orbit_Asc", "Aqua_Orbit_Asc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "Aqua_Orbit_Dsc", "Aqua_Orbit_Dsc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "Aura_Orbit_Asc", "Aura_Orbit_Asc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+ SOTE.util.generateWmsProductLayersForDateRange(product, "Aura_Orbit_Dsc", "Aura_Orbit_Dsc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
+
+ (product == "sedac_bound") ? [{displayName: "sedac_bound", wmsProductName: "sedac_bound", time:"", format: "image/png", urls:["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], tileSize:[512,512], projection:"EPSG:4326", numZoomLevels:9, maxExtent:[-180,-1350,180,90], maxResolution:0.5625, preferredOpacity: 0.90, bringToFront: true, transitionEffect:"none" }] : [],
+ (product == "MODIS_Land_Water_Mask") ? [{displayName: "MODIS_Land_Water_Mask", wmsProductName: "MODIS_Land_Water_Mask", time:"", format: "image/png", urls:["http://map1.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], tileSize:[512,512], projection:"EPSG:4326", numZoomLevels:9, maxExtent:[-180,-1350,180,90], maxResolution:0.5625, preferredOpacity: 0.75, bringToFront:true }] : [],
+ (product == "grump-v1-population-count_2000") ? [{displayName: "grump-v1-population-count_2000", wmsProductName: "grump-v1-population-count_2000", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.55 }] : [],
+ (product == "ndh-cyclone-hazard-frequency-distribution") ? [{displayName: "ndh-cyclone-hazard-frequency-distribution", wmsProductName: "ndh-cyclone-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-cyclone-proportional-economic-loss-risk-deciles") ? [{displayName: "ndh-cyclone-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-cyclone-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-cyclone-mortality-risks-distribution") ? [{displayName: "ndh-cyclone-mortality-risks-distribution", wmsProductName: "ndh-cyclone-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-flood-hazard-frequency-distribution") ? [{displayName: "ndh-flood-hazard-frequency-distribution", wmsProductName: "ndh-flood-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-flood-proportional-economic-loss-risk-deciles") ? [{displayName: "ndh-flood-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-flood-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-flood-mortality-risks-distribution") ? [{displayName: "ndh-flood-mortality-risks-distribution", wmsProductName: "ndh-flood-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-drought-hazard-frequency-distribution") ? [{displayName: "ndh-drought-hazard-frequency-distribution", wmsProductName: "ndh-drought-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-drought-proportional-economic-loss-risk-deciles") ? [{displayName: "ndh-drought-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-drought-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-drought-mortality-risks-distribution") ? [{displayName: "ndh-drought-mortality-risks-distribution", wmsProductName: "ndh-drought-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-volcano-hazard-frequency-distribution") ? [{displayName: "ndh-volcano-hazard-frequency-distribution", wmsProductName: "ndh-volcano-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-volcano-proportional-economic-loss-risk-deciles") ? [{displayName: "ndh-volcano-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-volcano-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "ndh-volcano-mortality-risks-distribution") ? [{displayName: "ndh-volcano-mortality-risks-distribution", wmsProductName: "ndh-volcano-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 }] : [],
+ (product == "cartographic:esri-administrative-boundaries_level-1") ? [{displayName: "cartographic:esri-administrative-boundaries_level-1", wmsProductName: "cartographic:esri-administrative-boundaries_level-1", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"cartographic:esri-administrative-boundaries_level-1", transparent:true, projection:"EPSG:4326", preferredOpacity: 0.55, bringToFront: true }] : [],
+ (product == "gpw-v3-coastlines") ? [{displayName: "gpw-v3-coastlines", wmsProductName: "gpw-v3-coastlines", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"gpw-v3-coastlines", transparent:true, projection:"EPSG:4326", preferredOpacity: 0.85, bringToFront: true}] : [],
+ (product == "cartographic:00-global-labels") ? [{displayName: "cartographic:00-global-labels", wmsProductName: "cartographic:00-global-labels", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"cartographic:00-global-labels", transparent:true, projection:"EPSG:4326", preferredOpacity: 0.95, bringToFront: true }] : []
+ ];
+
+
+ }
+ else if (this.state == "arctic")
+ {
+ layersToAdd = [
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_CorrectedReflectance_TrueColor", "MODIS_Terra_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_CorrectedReflectance_TrueColor", "MODIS_Aqua_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_CorrectedReflectance_Bands367", "MODIS_Terra_CorrectedReflectance_Bands367", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
+
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Brightness_Temp_Band31_Day", "MODIS_Terra_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Brightness_Temp_Band31_Night", "MODIS_Terra_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Brightness_Temp_Band31_Day", "MODIS_Aqua_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Brightness_Temp_Band31_Night", "MODIS_Aqua_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Snow_Cover", "MODIS_Terra_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Snow_Cover", "MODIS_Aqua_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Sea_Ice", "MODIS_Terra_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Sea_Ice", "MODIS_Aqua_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+
+ (product == "grump-v1-population-count_2000") ? [{displayName: "grump-v1-population-count_2000", wmsProductName: "grump-v1-population-count_2000", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], projection:"EPSG:3995", preferredOpacity: 0.75, bringToFront: true }] : [],
+ (product == "polarview:graticuleN") ? [{displayName: "polarview:graticuleN", wmsProductName: "polarview:graticuleN", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:graticuleN", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.75, bringToFront: true }] : [],
+ (product == "cartographic:national-boundaries") ? [{displayName: "cartographic:national-boundaries", wmsProductName: "cartographic:national-boundaries", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], layers:"cartographic:national-boundaries", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.55, bringToFront: true }] : [],
+ (product == "polarview:coastArctic10") ? [{displayName: "polarview:coastArctic10", wmsProductName: "polarview:coastArctic10", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:coastArctic10", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.95, bringToFront: true }] : [],
+ //{displayName: "coastlines", wmsProductName: "coastlines", time:"", urls:[" http://nsidc.org/cgi-bin/atlas_north?"], layers:"coastlines", transparent:true, projection:"EPSG:32661", preferredOpacity: 0.85, bringToFront: true },
+ (product == "cartographic:00-global-labels") ? [{displayName: "cartographic:00-global-labels", wmsProductName: "cartographic:00-global-labels", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"cartographic:00-global-labels", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.95, bringToFront: true }] : []
+ ];
+
+ }
+ else if (this.state == "antarctic")
+ {
+ layersToAdd = [
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_CorrectedReflectance_TrueColor", "MODIS_Terra_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_CorrectedReflectance_TrueColor", "MODIS_Aqua_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_CorrectedReflectance_Bands367", "MODIS_Terra_CorrectedReflectance_Bands367", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
+
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Brightness_Temp_Band31_Day", "MODIS_Terra_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Brightness_Temp_Band31_Night", "MODIS_Terra_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Brightness_Temp_Band31_Day", "MODIS_Aqua_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Brightness_Temp_Band31_Night", "MODIS_Aqua_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Snow_Cover", "MODIS_Terra_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Snow_Cover", "MODIS_Aqua_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Terra_Sea_Ice", "MODIS_Terra_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "MODIS_Aqua_Sea_Ice", "MODIS_Aqua_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+ SOTE.util.generateProductLayersForDateRange(product, "NSIDC_Sea_Ice_Concentration", "NSIDC_Sea_Ice_Concentration", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
+
+ (product == "grump-v1-population-count_2000") ? [{displayName: "grump-v1-population-count_2000", wmsProductName: "grump-v1-population-count_2000", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], projection:"EPSG:3031", preferredOpacity: 0.75, bringToFront: true }] : [],
+ (product == "polarview:graticule3031_10x30") ? [{displayName: "polarview:graticule3031_10x30", wmsProductName: "polarview:graticule3031_10x30", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:graticule3031_10x30", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.75, bringToFront: true }] : [],
+ (product == "cartographic:national-boundaries") ? [{displayName: "cartographic:national-boundaries", wmsProductName: "cartographic:national-boundaries", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], layers:"cartographic:national-boundaries", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.55, bringToFront: true }] : [],
+ (product == "polarview:coastS10") ? [{displayName: "polarview:coastS10", wmsProductName: "polarview:coastS10", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:coastS10", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.85, bringToFront: true }] : [],
+ (product == "lat_long_grid") ? [{displayName: "lat_long_grid", wmsProductName: "lat_long_grid", time:"", urls:["http://nsidc.org/cgi-bin/atlas_south?"], layers:"lat_long_grid", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.85, bringToFront: true }] : [],
+ (product == "coastlines") ? [{displayName: "coastlines", wmsProductName: "coastlines", time:"", urls:["http://nsidc.org/cgi-bin/atlas_south?"], layers:"coastlines", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.95, bringToFront: true }] : []
+ ];
+ }
+
+
+ // Load product layer(s) into map
+ for (var i=0; i<layersToAdd.length; i++)
+ {
+ if (layersToAdd[i].length > 0)
+ {
+ this.addLayers(layersToAdd[i]);
+ }
+ }
+
+}
+
+
+/**
+ * Function to manage which layers are currently loaded into the map object.
+ * This is needed since it causes browser slowdowns to preload all layers into mmeory.
+ *
+ * @param querystring querystring from updateComponent
+ */
+SOTE.widget.MapSote.prototype.manageLoadedLayers = function(querystring)
+{
+ // Check for projection state change
var state = (SOTE.util.extractFromQuery("switch",querystring))? SOTE.util.extractFromQuery("switch",querystring): "geographic";
- // Load SOTE-specific map data if not already cached
- if (!this.isSoteMapDataCached || state != this.state)
+ if (state != this.state)
{
this.state = state;
if(this.state == "geographic")
@@ -151,181 +347,102 @@ SOTE.widget.MapSote.prototype.updateComponent = function(querystring)
this.projection = "EPSG:3031";
else if (this.state == "arctic")
this.projection = "EPSG:3995";
-
- // Define static layers
- if(this.state == "geographic"){
- var staticProductLayers =
- [
- //{displayName: "population", wmsProductName: "population", time:"", format: "image/png", urls:["http://map1.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], tileSize:[512,512], projection:"EPSG:4326", numZoomLevels:9, maxExtent:[-180,-1350,180,90], maxResolution:0.5625, preferredOpacity: 0.55 },
- {displayName: "MODIS_Land_Water_Mask", wmsProductName: "MODIS_Land_Water_Mask", time:"", format: "image/png", urls:["http://map1.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], tileSize:[512,512], projection:"EPSG:4326", numZoomLevels:9, maxExtent:[-180,-1350,180,90], maxResolution:0.5625, preferredOpacity: 0.75, bringToFront:true },
- {displayName: "grump-v1-population-count_2000", wmsProductName: "grump-v1-population-count_2000", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.55 },
- {displayName: "ndh-cyclone-hazard-frequency-distribution", wmsProductName: "ndh-cyclone-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-cyclone-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-cyclone-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-cyclone-mortality-risks-distribution", wmsProductName: "ndh-cyclone-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-flood-hazard-frequency-distribution", wmsProductName: "ndh-flood-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-flood-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-flood-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-flood-mortality-risks-distribution", wmsProductName: "ndh-flood-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-drought-hazard-frequency-distribution", wmsProductName: "ndh-drought-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-drought-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-drought-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-drought-mortality-risks-distribution", wmsProductName: "ndh-drought-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-volcano-hazard-frequency-distribution", wmsProductName: "ndh-volcano-hazard-frequency-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-volcano-proportional-economic-loss-risk-deciles", wmsProductName: "ndh-volcano-proportional-economic-loss-risk-deciles", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- {displayName: "ndh-volcano-mortality-risks-distribution", wmsProductName: "ndh-volcano-mortality-risks-distribution", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], projection:"EPSG:4326", preferredOpacity: 0.75 },
- // {displayName: "fires24", wmsProductName: "fires24", time:"", urls:["http://firms.modaps.eosdis.nasa.gov/wms/?"], layers:"fires24", transparent:true, projection:"EPSG:4326", preferredOpacity: 1.0},
- // {displayName: "fires48", wmsProductName: "fires48", time:"", urls:["http://firms.modaps.eosdis.nasa.gov/wms/?"], layers:"fires48", transparent:true, projection:"EPSG:4326", preferredOpacity: 1.0},
- {displayName: "cartographic:esri-administrative-boundaries_level-1", wmsProductName: "cartographic:esri-administrative-boundaries_level-1", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"cartographic:esri-administrative-boundaries_level-1", transparent:true, projection:"EPSG:4326", preferredOpacity: 0.55, bringToFront: true },
- // {displayName: "cartographic:national-boundaries", wmsProductName: "cartographic:national-boundaries", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], layers:"cartographic:national-boundaries", transparent:true, projection:"EPSG:4326", preferredOpacity: 0.55, bringToFront: true },
- {displayName: "sedac_bound", wmsProductName: "sedac_bound", time:"", format: "image/png", urls:["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], tileSize:[512,512], projection:"EPSG:4326", numZoomLevels:9, maxExtent:[-180,-1350,180,90], maxResolution:0.5625, preferredOpacity: 0.90, bringToFront: true, transitionEffect:"none" },
- {displayName: "gpw-v3-coastlines", wmsProductName: "gpw-v3-coastlines", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"gpw-v3-coastlines", transparent:true, projection:"EPSG:4326", preferredOpacity: 0.85, bringToFront: true},
- {displayName: "cartographic:00-global-labels", wmsProductName: "cartographic:00-global-labels", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"cartographic:00-global-labels", transparent:true, projection:"EPSG:4326", preferredOpacity: 0.95, bringToFront: true }
- ];
-
- this.soteMapData = staticProductLayers.concat(
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_CorrectedReflectance_TrueColor", "MODIS_Terra_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_SurfaceReflectance_Bands143", "MODIS_Terra_SurfaceReflectance_Bands143", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_CorrectedReflectance_TrueColor", "MODIS_Aqua_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_SurfaceReflectance_Bands143", "MODIS_Aqua_SurfaceReflectance_Bands143", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_CorrectedReflectance_Bands721", "MODIS_Terra_CorrectedReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_CorrectedReflectance_Bands721", "MODIS_Aqua_CorrectedReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_SurfaceReflectance_Bands721", "MODIS_Terra_SurfaceReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_SurfaceReflectance_Bands721", "MODIS_Aqua_SurfaceReflectance_Bands721", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_CorrectedReflectance_Bands367", "MODIS_Terra_CorrectedReflectance_Bands367", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_SurfaceReflectance_Bands121", "MODIS_Terra_SurfaceReflectance_Bands121", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_250m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_SurfaceReflectance_Bands121", "MODIS_Aqua_SurfaceReflectance_Bands121", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_250m),
-
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Data_No_Data", "MODIS_Terra_Data_No_Data", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Data_No_Data", "MODIS_Aqua_Data_No_Data", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_250m, this.TILEMATRIXSET_GEO_250m),
+ // Reinitialize map (and thereby remove all existing layers from memory)
+ this.init();
+ this.initMapSote();
+ }
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Snow_Cover", "MODIS_Terra_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Snow_Cover", "MODIS_Aqua_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_500m, this.TILEMATRIXSET_GEO_500m),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Sea_Ice", "MODIS_Terra_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Sea_Ice", "MODIS_Aqua_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Land_Surface_Temp_Day", "MODIS_Terra_Land_Surface_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Land_Surface_Temp_Day", "MODIS_Aqua_Land_Surface_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Land_Surface_Temp_Night", "MODIS_Terra_Land_Surface_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Land_Surface_Temp_Night", "MODIS_Aqua_Land_Surface_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Brightness_Temp_Band31_Day", "MODIS_Terra_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Brightness_Temp_Band31_Day", "MODIS_Aqua_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Brightness_Temp_Band31_Night", "MODIS_Terra_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Brightness_Temp_Band31_Night", "MODIS_Aqua_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Aerosol", "MODIS_Terra_Aerosol", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Aerosol", "MODIS_Aqua_Aerosol", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Water_Vapor_5km_Day", "MODIS_Terra_Water_Vapor_5km_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Water_Vapor_5km_Day", "MODIS_Aqua_Water_Vapor_5km_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Water_Vapor_5km_Night", "MODIS_Terra_Water_Vapor_5km_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Water_Vapor_5km_Night", "MODIS_Aqua_Water_Vapor_5km_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Cloud_Top_Pressure_Day", "MODIS_Terra_Cloud_Top_Pressure_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Cloud_Top_Pressure_Day", "MODIS_Aqua_Cloud_Top_Pressure_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Cloud_Top_Pressure_Night", "MODIS_Terra_Cloud_Top_Pressure_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Cloud_Top_Pressure_Night", "MODIS_Aqua_Cloud_Top_Pressure_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Cloud_Top_Temp_Day", "MODIS_Terra_Cloud_Top_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Cloud_Top_Temp_Day", "MODIS_Aqua_Cloud_Top_Temp_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Terra_Cloud_Top_Temp_Night", "MODIS_Terra_Cloud_Top_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("MODIS_Aqua_Cloud_Top_Temp_Night", "MODIS_Aqua_Cloud_Top_Temp_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
-
- SOTE.util.generateProductLayersForDateRangeTMS("AIRS_Dust_Score", "AIRS_Dust_Score", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("AIRS_CO_Total_Column_Day", "AIRS_CO_Total_Column_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("AIRS_CO_Total_Column_Night", "AIRS_CO_Total_Column_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("AIRS_Prata_SO2_Index_Day", "AIRS_Prata_SO2_Index_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("AIRS_Prata_SO2_Index_Night", "AIRS_Prata_SO2_Index_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("AIRS_Precipitation_Day", "AIRS_Precipitation_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("AIRS_Precipitation_Night", "AIRS_Precipitation_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
-
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_Cloud_Pressure", "OMI_Cloud_Pressure", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_Aerosol_Index", "OMI_Aerosol_Index", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_Aerosol_Optical_Depth", "OMI_Aerosol_Optical_Depth", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_Absorbing_Aerosol_Optical_Depth", "OMI_Absorbing_Aerosol_Optical_Depth", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_SO2_Lower_Troposphere", "OMI_SO2_Lower_Troposphere", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_SO2_Middle_Troposphere", "OMI_SO2_Middle_Troposphere", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_SO2_Upper_Troposphere_and_Stratosphere", "OMI_SO2_Upper_Troposphere_and_Stratosphere", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
- SOTE.util.generateProductLayersForDateRangeTMS("OMI_SO2_Planetary_Boundary_Layer", "OMI_SO2_Planetary_Boundary_Layer", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_2km, this.TILEMATRIXSET_GEO_2km),
-
- SOTE.util.generateProductLayersForDateRangeTMS("OBPG_MODIS_Aqua_Chlorophyll_A", "OBPG_MODIS_Aqua_Chlorophyll_A", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
- SOTE.util.generateProductLayersForDateRangeTMS("OBPG_SeaSurfaceTemperature_11_Day", "OBPG_SeaSurfaceTemperature_11_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1b.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"], [512,512], "EPSG:4326", 9, [-180,-1350,180,90], 0.5625, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_GEO_ALL, this.RESOLUTIONS_ON_SERVER_GEO_1km, this.TILEMATRIXSET_GEO_1km),
+
+ // Retrieve and compare "updated" products to "old" products
+ var isProductListDifferent = false;
+ var updatedProductListQs = (SOTE.util.extractFromQuery("products",querystring));
+ if (updatedProductListQs != this.terribleProductListSaver)
+ {
+ // Products have been updated and map needs to reflect this
+ isProductListDifferent = true;
+ this.terribleProductListSaver = updatedProductListQs;
+ }
+
-
- SOTE.util.generateWmsProductLayersForDateRange("MODIS_Fires_All", "MODIS_Fires_All", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("MODIS_Fires_Terra", "MODIS_Fires_Terra", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("MODIS_Fires_Aqua", "MODIS_Fires_Aqua", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("Terra_Orbit_Asc", "Terra_Orbit_Asc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("Terra_Orbit_Dsc", "Terra_Orbit_Dsc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("Aqua_Orbit_Asc", "Aqua_Orbit_Asc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("Aqua_Orbit_Dsc", "Aqua_Orbit_Dsc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("Aura_Orbit_Asc", "Aura_Orbit_Asc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE),
- SOTE.util.generateWmsProductLayersForDateRange("Aura_Orbit_Dsc", "Aura_Orbit_Dsc", "image/png", ["http://map2a.vis.earthdata.nasa.gov/wms/wms.php", "http://map2b.vis.earthdata.nasa.gov/wms/wms.php", "http://map2c.vis.earthdata.nasa.gov/wms/wms.php"], "EPSG:4326", 1.0, true, this.NUM_DAYS_TO_GENERATE)
- );
- }
- else if (this.state == "antarctic"){
- var staticProductLayers =
- [
- {displayName: "grump-v1-population-count_2000", wmsProductName: "grump-v1-population-count_2000", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], projection:"EPSG:3031", preferredOpacity: 0.75, bringToFront: true },
- {displayName: "polarview:graticule3031_10x30", wmsProductName: "polarview:graticule3031_10x30", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:graticule3031_10x30", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.75, bringToFront: true },
- {displayName: "cartographic:national-boundaries", wmsProductName: "cartographic:national-boundaries", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], layers:"cartographic:national-boundaries", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.55, bringToFront: true },
- {displayName: "polarview:coastS10", wmsProductName: "polarview:coastS10", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:coastS10", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.85, bringToFront: true },
- {displayName: "lat_long_grid", wmsProductName: "lat_long_grid", time:"", urls:["http://nsidc.org/cgi-bin/atlas_south?"], layers:"lat_long_grid", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.85, bringToFront: true },
- {displayName: "coastlines", wmsProductName: "coastlines", time:"", urls:["http://nsidc.org/cgi-bin/atlas_south?"], layers:"coastlines", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.95, bringToFront: true }
- // {displayName: "cartographic:00-global-labels", wmsProductName: "cartographic:00-global-labels", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"cartographic:00-global-labels", transparent:true, projection:"EPSG:3031", preferredOpacity: 0.95, bringToFront: true }
- ];
-
- // Generate a layer for each product for each day, then concatenate with static layer array
- this.soteMapData = staticProductLayers.concat(
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_CorrectedReflectance_TrueColor", "MODIS_Terra_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_CorrectedReflectance_TrueColor", "MODIS_Aqua_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_CorrectedReflectance_Bands367", "MODIS_Terra_CorrectedReflectance_Bands367", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
-
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Brightness_Temp_Band31_Day", "MODIS_Terra_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Brightness_Temp_Band31_Night", "MODIS_Terra_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Brightness_Temp_Band31_Day", "MODIS_Aqua_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Brightness_Temp_Band31_Night", "MODIS_Aqua_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Snow_Cover", "MODIS_Terra_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Snow_Cover", "MODIS_Aqua_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Sea_Ice", "MODIS_Terra_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Sea_Ice", "MODIS_Aqua_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("NSIDC_Sea_Ice_Concentration", "NSIDC_Sea_Ice_Concentration", "image/png", ["http://map1a.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/antarctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/antarctic/wms.cgi"], [512,512], "EPSG:3031", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km)
- );
+ if (isProductListDifferent)
+ {
+ // Parse "updated" products
+ var allActiveLayers = [];
+ var productsAndBaselayersQs = updatedProductListQs.split("~");
+ var updatedBaselayerQs = productsAndBaselayersQs[0];
+ var updatedOverlaysQs = productsAndBaselayersQs[1];
+ if (updatedBaselayerQs.split(".").length > 1)
+ {
+ allActiveLayers.push((updatedBaselayerQs.split("."))[1]);
+ }
+ var numOverlays = updatedOverlaysQs ? updatedOverlaysQs.split(".").length - 1 : 0;
+ if (numOverlays > 0)
+ {
+ for (var i=0; i<numOverlays; i++)
+ {
+ allActiveLayers.push((updatedOverlaysQs.split("."))[i+1]);
+ }
}
- else if (this.state == "arctic"){
- var staticProductLayers =
- [
- {displayName: "grump-v1-population-count_2000", wmsProductName: "grump-v1-population-count_2000", time:"", format: "image/png", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], projection:"EPSG:3995", preferredOpacity: 0.75, bringToFront: true },
- {displayName: "polarview:graticuleN", wmsProductName: "polarview:graticuleN", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:graticuleN", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.75, bringToFront: true },
- {displayName: "cartographic:national-boundaries", wmsProductName: "cartographic:national-boundaries", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/ows"], layers:"cartographic:national-boundaries", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.55, bringToFront: true },
- {displayName: "polarview:coastArctic10", wmsProductName: "polarview:coastArctic10", time:"", urls:["http://geos.polarview.aq/geoserver/wms?"], layers:"polarview:coastArctic10", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.95, bringToFront: true },
- {displayName: "cartographic:00-global-labels", wmsProductName: "cartographic:00-global-labels", time:"", urls:["http://sedac.ciesin.columbia.edu/geoserver/wms?"], layers:"cartographic:00-global-labels", transparent:true, projection:"EPSG:3995", preferredOpacity: 0.95, bringToFront: true }
- ];
-
- // Generate a layer for each product for each day, then concatenate with static layer array
- this.soteMapData = staticProductLayers.concat(
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_CorrectedReflectance_TrueColor", "MODIS_Terra_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_CorrectedReflectance_TrueColor", "MODIS_Aqua_CorrectedReflectance_TrueColor", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_CorrectedReflectance_Bands367", "MODIS_Terra_CorrectedReflectance_Bands367", "image/jpeg", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_250m),
-
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Brightness_Temp_Band31_Day", "MODIS_Terra_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Brightness_Temp_Band31_Night", "MODIS_Terra_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Brightness_Temp_Band31_Day", "MODIS_Aqua_Brightness_Temp_Band31_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Brightness_Temp_Band31_Night", "MODIS_Aqua_Brightness_Temp_Band31_Night", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Snow_Cover", "MODIS_Terra_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Snow_Cover", "MODIS_Aqua_Snow_Cover", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_500m),
- SOTE.util.generateProductLayersForDateRange("MODIS_Terra_Sea_Ice", "MODIS_Terra_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("MODIS_Aqua_Sea_Ice", "MODIS_Aqua_Sea_Ice", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("NSIDC_Sea_Ice_Concentration", "NSIDC_Sea_Ice_Concentration", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("OBPG_MODIS_Aqua_Chlorophyll_A", "OBPG_MODIS_Aqua_Chlorophyll_A", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km),
- SOTE.util.generateProductLayersForDateRange("OBPG_SeaSurfaceTemperature_11_Day", "OBPG_SeaSurfaceTemperature_11_Day", "image/png", ["http://map1a.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1b.vis.earthdata.nasa.gov/arctic/wms.cgi", "http://map1c.vis.earthdata.nasa.gov/arctic/wms.cgi"], [512,512], "EPSG:3995", 6, [-4194304,-4194304,4194304,4194304], 8192.0, 1.0, this.NUM_DAYS_TO_GENERATE, this.RESOLUTIONS_ON_SCREEN_POLAR_ALL, this.RESOLUTIONS_ON_SERVER_POLAR_1km)
- );
-
+
+ // Define "startsWith" string operator if it doesn't exist
+ if (typeof String.prototype.startsWith != 'function')
+ {
+ String.prototype.startsWith = function (str)
+ {
+ return this.slice(0, str.length) == str;
+ };
}
+
+ // Check if updated products are currently cached
+ var productsToAdd = [];
+ for (var i=0; i<allActiveLayers.length; i++)
+ {
+ var isProductAlreadyLoaded = false;
+
+ for (var j=0; j<this.map.layers.length; j++)
+ {
+ if (this.map.layers[j].name.startsWith(allActiveLayers[i]))
+ {
+ isProductAlreadyLoaded = true;
+ break;
+ }
+ }
+
+ if (!isProductAlreadyLoaded)
+ productsToAdd.push(allActiveLayers[i]);
+ }
+
+ // Add only the layers that are necessary
+ for (var i=0; i<productsToAdd.length; i++)
+ {
+ this.addProductToMap(productsToAdd[i], state);
+ }
+ }
+
+}
+
+
+/**
+ * Change the base layers based on dependencies (i.e. extent, date, data product)
+ *
+ * Update component with QS.
+ *
+ * @this {map}
+ * @param {String} querystring contains all values of dependencies (from registry)
+ * @returns {boolean} true or false depending on if the component still validates with the new criteria
+ *
+*/
+SOTE.widget.MapSote.prototype.updateComponent = function(querystring)
+{
+
+ var state = (SOTE.util.extractFromQuery("switch",querystring))? SOTE.util.extractFromQuery("switch",querystring): "geographic";
+
+
+ // Manage the currently-loaded layers by adding/removing, as necessary
+ this.manageLoadedLayers(querystring);
- this.init();
- this.initMapSote();
- // Load full and tiled WMS layers into primary map
- this.addLayers(this.soteMapData);
-
- // Update flag upon successful load
- this.isSoteMapDataCached = true;
- }
-
// Parse querystring
var qs = (querystring === undefined)? "":querystring;