Interactive interface for browsing global, full-resolution satellite imagery
New version of the map code which now uses a configuration file from the remote server and dynamically creates layers as needed
Mike McGannd6ac0ccc4b10
diff --git a/css/dateSpan.css b/css/dateSpan.cssindex 967a604cd..f601f63aa 100644--- a/css/dateSpan.css+++ b/css/dateSpan.css@@ -73,4 +73,4 @@ a.ui-btn-up-c {box-shadow:none;}#mapdiv {margin:0; padding:0; left:0px;}.dateitem {cursor:pointer !important;}-\ No newline at end of file+diff --git a/css/map.css b/css/map.cssindex a81e47f30..04881ff4b 100644--- a/css/map.css+++ b/css/map.css@@ -59,9 +59,14 @@ div.olControlScaleLineCustom {div.olMap {background-color: #000000;+ /*position:absolute !important; left:0; top:0; width: 100%; height: 100%;*/+ position: absolute;+ top: 0;+ left: 0;+ width: 100%;+ height: 100%;}-/* Zoom panel controls */div.olControlZoomPanelCustom {top: 101px;@@ -192,3 +197,5 @@ div.olControlZoomPanelCustom .olControlZoomToMaxExtentItemInactive {#title, #tags, #shortdesc {display: none;}++diff --git a/css/sote.css b/css/sote.cssindex d7d288814..f7731d83b 100644--- a/css/sote.css+++ b/css/sote.css@@ -55,7 +55,7 @@ div.horizontalContainer {width:100%; display:block; float:left; position:absolu#transition {width:22%; height:100px; text-shadow:none; color: #262626; margin-top:55px;}#hazard {top:-13px; }-#map {position:absolute !important; left:0; top:0;}+/* #map {position:absolute !important; left:0; top:0;} */#dlMap {position:absolute !important; left:0; top:0; background-color:#0000FF; opacity:0; width:100%; height:100%;z-index:-1; overflow:hidden;}diff --git a/data/map b/data/mapnew file mode 100644index 000000000..d8fc7c62f--- /dev/null+++ b/data/map@@ -0,0 +1,2859 @@+{+"projections": {++ "geographic": {+ "name": "geographic",+ "projection": "EPSG:4326",+ "maxExtent": [-180, -180, 90, 90],+ "restrictedExtent": [-230, -120, 230, 120],+ "numZoomLevels": 9,+ "resolutions": [+ 0.5625, 0.28125, 0.140625,+ 0.0703125, 0.03515625, 0.017578125,+ 0.0087890625, 0.00439453125, 0.002197265625+ ],+ "startCenter": [0, 0],+ "startZoom": 1+ },++ "arctic": {+ "name": "arctic",+ "projection": "EPSG:3995",+ "units": "m",+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "restrictedExtent": [-6500000, -5000000, 6500000, 5000000],+ "numZoomLevels": 6,+ "resolutions": [+ 8192.0, 4096.0, 2048.0,+ 1024.0, 512.0, 256.0+ ],+ "startCenter": [0, 0],+ "startZoom": 1+ },++ "antarctic": {+ "name": "antarctic",+ "projection": "EPSG:3031",+ "units": "m",+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "restrictedExtent": [-6500000, -5000000, 6500000, 5000000],+ "numZoomLevels": 6,+ "fractionalZoom": false,+ "resolutions": [+ 8192.0, 4096.0, 2048.0,+ 1024.0, 512.0, 256.0+ ],+ "startCenter": [0, 0],+ "startZoom": 1+ }+},++"products": {++ "MODIS_Terra_CorrectedReflectance_TrueColor": {+ "name": "Corrected Reflectance (True Color)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_CorrectedReflectance_TrueColor",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_CorrectedReflectance_TrueColor": {+ "name": "Corrected Reflectance (True Color)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_CorrectedReflectance_TrueColor",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_SurfaceReflectance_Bands143": {+ "name": "Land Surface Reflectance (True Color)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_SurfaceReflectance_Bands143",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_500m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_500m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_500m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_SurfaceReflectance_Bands143": {+ "name": "Land Surface Reflectance (True Color)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_SurfaceReflectance_Bands143",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_500m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_500m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_500m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_SurfaceReflectance_Bands121": {+ "name": "Land Surface Reflectance (1-2-1)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_SurfaceReflectance_Bands121",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_SurfaceReflectance_Bands121": {+ "name": "Land Surface Reflectance (1-2-1)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_SurfaceReflectance_Bands121",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_CorrectedReflectance_Bands367": {+ "name": "Corrected Reflectance (3-6-7)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_CorrectedReflectance_Bands367",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_CorrectedReflectance_Bands721": {+ "name": "Corrected Reflectance (7-2-1)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_CorrectedReflectance_Bands721",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_CorrectedReflectance_Bands721": {+ "name": "Corrected Reflectance (7-2-1)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_CorrectedReflectance_Bands721",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_SurfaceReflectance_Bands721": {+ "name": "Land Surface Reflectance (7-2-1)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_SurfaceReflectance_Bands721",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_500m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_500m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_500m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_SurfaceReflectance_Bands721": {+ "name": "Land Surface Reflectance (7-2-1)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_SurfaceReflectance_Bands721",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_500m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_500m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_500m",+ "maxResolution": 8192.0+ }+ }+ },++ "VIIRS_CityLights_2012": {+ "name": "Earth at Night 2012",+ "description": "Suomi NPP / VIIRS via NASA Earth Observatory",++ "product": "static",+ "type": "wmts",++ "properties": {+ "layer": "VIIRS_CityLights_2012",+ "defaultLayer": "true",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_500m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_500m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_500m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_Aerosol": {+ "name": "Aerosol Optical Depth",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Aerosol",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Aerosol": {+ "name": "Aerosol Optical Depth",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Aerosol",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Terra_Brightness_Temp_Band31_Day": {+ "name": "Brightness Temperature (Band 31-Day)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Brightness_Temp_Band31_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_1km",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_1km",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_Brightness_Temp_Band31_Night": {+ "name": "Brightness Temperature (Band 31-Night)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Brightness_Temp_Band31_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_1km",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_1km",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_Brightness_Temp_Band31_Day": {+ "name": "Brightness Temperature (Band 31-Day)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Brightness_Temp_Band31_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_1km",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_1km",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_Brightness_Temp_Band31_Night": {+ "name": "Brightness Temperature (Band 31-Night)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Brightness_Temp_Band31_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_1km",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_1km",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_Cloud_Top_Pressure_Day": {+ "name": "Cloud Top Pressure (Day)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Cloud_Top_Pressure_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Terra_Cloud_Top_Pressure_Night": {+ "name": "Cloud Top Pressure (Night)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Cloud_Top_Pressure_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Cloud_Top_Pressure_Day": {+ "name": "Cloud Top Pressure (Day)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Cloud_Top_Pressure_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Cloud_Top_Pressure_Night": {+ "name": "Cloud Top Pressure (Night)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Cloud_Top_Pressure_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Terra_Cloud_Top_Temp_Day": {+ "name": "Cloud Top Temperature (Day)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Cloud_Top_Temp_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Terra_Cloud_Top_Temp_Night": {+ "name": "Cloud Top Temperature (Night)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Cloud_Top_Temp_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Cloud_Top_Temp_Day": {+ "name": "Cloud Top Temperature (Day)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Cloud_Top_Temp_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Cloud_Top_Temp_Night": {+ "name": "Cloud Top Temperature (Night)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Cloud_Top_Temp_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Fires_All": {+ "name": "Fires (Day and Night)",+ "description": "Terra/ and Aqua/MODIS Fire and Thermal Anomalies",++ "product": "daily",+ "type": "wms",+ "startDate": "2012-04-07",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "MODIS_Fires_All",+ "format": "image/png"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "MODIS_Fires_Terra": {+ "name": "Fires (Day and Night)",+ "description": "Terra/MODIS Fire and Thermal Anomalies",++ "product": "daily",+ "type": "wms",+ "startDate": "2012-04-07",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "MODIS_Fires_Terra",+ "format": "image/png"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "MODIS_Fires_Aqua": {+ "name": "Fires (Day and Night)",+ "description": "Aqua/MODIS Fire and Thermal Anomalies",++ "product": "daily",+ "type": "wms",+ "startDate": "2012-04-07",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "MODIS_Fires_Aqua",+ "format": "image/png"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "MODIS_Terra_Land_Surface_Temp_Day": {+ "name": "Land Surface Temperature (Day)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Land_Surface_Temp_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Terra_Land_Surface_Temp_Night": {+ "name": "Land Surface Temperature (Night)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Land_Surface_Temp_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Land_Surface_Temp_Day": {+ "name": "Land Surface Temperature (Day)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Land_Surface_Temp_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Land_Surface_Temp_Night": {+ "name": "Land Surface Temperature (Night)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Land_Surface_Temp_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Terra_Sea_Ice": {+ "name": "Sea Ice",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Sea_Ice",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_1km",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_1km",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_Sea_Ice": {+ "name": "Sea Ice",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Sea_Ice",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_1km",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_1km",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_1km",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_Snow_Cover": {+ "name": "Snow Cover",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Snow_Cover",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_500m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_500m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_500m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Aqua_Snow_Cover": {+ "name": "Snow Cover",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Snow_Cover",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_500m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_500m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_500m",+ "maxResolution": 8192.0+ }+ }+ },++ "MODIS_Terra_Water_Vapor_5km_Day": {+ "name": "Water Vapor (Day)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Water_Vapor_5km_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Terra_Water_Vapor_5km_Night": {+ "name": "Water Vapor (Night)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Water_Vapor_5km_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Water_Vapor_5km_Day": {+ "name": "Water Vapor (Day)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Water_Vapor_5km_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Water_Vapor_5km_Night": {+ "name": "Water Vapor (Night)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Water_Vapor_5km_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "AIRS_CO_Total_Column_Day": {+ "name": "Carbon Monoxide (Total Column, Day)",+ "description": "Aqua / AIRS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "AIRS_CO_Total_Column_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "AIRS_CO_Total_Column_Night": {+ "name": "Carbon Monoxide (Total Column, Night)",+ "description": "Aqua / AIRS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "AIRS_CO_Total_Column_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "AIRS_Dust_Score": {+ "name": "Dust Score",+ "description": "Aqua / AIRS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "AIRS_Dust_Score",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "AIRS_Precipitation_Day": {+ "name": "Precipitation Estimate (Day)",+ "description": "Aqua / AIRS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "AIRS_Precipitation_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "AIRS_Precipitation_Night": {+ "name": "Precipitation Estimate (Night)",+ "description": "Aqua / AIRS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "AIRS_Precipitation_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "AIRS_Prata_SO2_Index_Day": {+ "name": "Sulphur Dioxide (Day, Prata Algorithm)",+ "description": "Aqua / AIRS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "AIRS_Prata_SO2_Index_Day",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "AIRS_Prata_SO2_Index_Night": {+ "name": "Sulphur Dioxide (Night, Prata Algorithm)",+ "description": "Aqua / AIRS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "AIRS_Prata_SO2_Index_Night",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_Absorbing_Aerosol_Optical_Depth": {+ "name": "Absorbing Aerosol Optical Depth",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_Absorbing_Aerosol_Optical_Depth",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_Aerosol_Index": {+ "name": "Aerosol Index",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_Aerosol_Index",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_Aerosol_Optical_Depth": {+ "name": "Aerosol Optical Depth",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_Aerosol_Optical_Depth",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_Cloud_Pressure": {+ "name": "Cloud Pressure",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_Cloud_Pressure",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_SO2_Planetary_Boundary_Layer": {+ "name": "Sulfur Dioxide (Planetary Boundary Layer)",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_SO2_Planetary_Boundary_Layer",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_SO2_Lower_Troposphere": {+ "name": "Sulfur Dioxide (Lower Troposphere)",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_SO2_Lower_Troposphere",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_SO2_Middle_Troposphere": {+ "name": "Sulfur Dioxide (Middle Troposphere)",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_SO2_Middle_Troposphere",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "OMI_SO2_Upper_Troposphere_and_Stratosphere": {+ "name": "Sulfur Dioxide (Upper Troposphere and Stratosphere)",+ "description": "Aura / OMI",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "OMI_SO2_Upper_Troposphere_and_Stratosphere",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_2km",+ "maxResolution": 0.5625+ }+ }+ },++ "ndh-cyclone-hazard-frequency-distribution": {+ "name": "Cyclone Hazard:Frequency and Distribution",+ "description": "SEDAC Global Cyclone Hazard Frequency and Distribution, v1 (1980–2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-cyclone-hazard-frequency-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-cyclone-mortality-risks-distribution": {+ "name": "Cyclone Hazard:Mortality Risk",+ "description": "SEDAC Global Cyclone Mortality Risks and Distribution, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-cyclone-mortality-risks-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-cyclone-proportional-economic-loss-risk-deciles": {+ "name": "Cyclone Hazard:Economic Risk",+ "description": "SEDAC Global Cyclone Proportional Economic Loss Risk Deciles, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-cyclone-proportional-economic-loss-risk-deciles",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-drought-hazard-frequency-distribution": {+ "name": "Drought Hazard:Frequency and Distribution",+ "description": "SEDAC Global Drought Hazard Frequency and Distribution, v1 (1980–2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-drought-hazard-frequency-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-drought-mortality-risks-distribution": {+ "name": "Drought Hazard:Mortality Risk",+ "description": "SEDAC Global Drought Mortality Risks and Distribution, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-drought-mortality-risks-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-drought-proportional-economic-loss-risk-deciles": {+ "name": "Drought Hazard:Economic Risk",+ "description": "SEDAC Global Drought Proportional Economic Loss Risk Deciles, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-drought-proportional-economic-loss-risk-deciles",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-flood-hazard-frequency-distribution": {+ "name": "Flood Hazard:Frequency and Distribution",+ "description": "SEDAC Global Flood Hazard Frequency and Distribution, v1 (1980–2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-flood-hazard-frequency-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-flood-mortality-risks-distribution": {+ "name": "Flood Hazard:Mortality Risk",+ "description": "SEDAC Global Flood Mortality Risks and Distribution, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-flood-mortality-risks-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-flood-proportional-economic-loss-risk-deciles": {+ "name": "Flood Hazard:Economic Risk",+ "description": "SEDAC Global Flood Proportional Economic Loss Risk Deciles, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-flood-proportional-economic-loss-risk-deciles",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-volcano-hazard-frequency-distribution": {+ "name": "Volcano Hazard:Frequency and Distribution",+ "description": "SEDAC Global Volcano Hazard Frequency and Distribution, v1 (1980–2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-volcano-hazard-frequency-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-volcano-mortality-risks-distribution": {+ "name": "Volcano Hazard:Mortality Risk",+ "description": "SEDAC Global Volcano Mortality Risks and Distribution, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-volcano-mortality-risks-distribution",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "ndh-volcano-proportional-economic-loss-risk-deciles": {+ "name": "Volcano Hazard:Economic Risk",+ "description": "SEDAC Global Volcano Proportional Economic Loss Risk Deciles, v1 (2000)",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "ndh-volcano-proportional-economic-loss-risk-deciles",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.75+ },++ "projections": {+ "geographic": {}+ }+ },++ "cartographic:esri-administrative-boundaries_level-1": {+ "name": "Administrative Boundaries",+ "description": "SEDAC / L1 Admin Boundaries",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "cartographic:esri-administrative-boundaries_level-1",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.55,+ "bringToFront": "true",+ "transitionEffect": "none"+ },++ "projections": {+ "geographic": {}+ }+ },++ "gpw-v3-coastlines": {+ "name": "Coastlines",+ "description": "SEDAC / Coastlines v3",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "gpw-v3-coastlines",+ "format": "image/png",+ "transparent": "true",+ "bringToFront": "true",+ "transitionEffect": "none"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.85+ },++ "projections": {+ "geographic": {}+ }+ },++ "cartographic:00-global-labels": {+ "name": "Coastlines",+ "description": "SEDAC / Coastlines v3",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "cartographic:00-global-labels",+ "format": "image/png",+ "transparent": "true",+ "bringToFront": "true",+ "transitionEffect": "none"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.95+ },++ "projections": {+ "geographic": {},+ "arctic": {}+ }+ },++ "sedac_bound": {+ "name": "National Boundaries",+ "description": "SEDAC / National Boundaries",++ "product": "static",+ "type": "wmts",++ "properties": {+ "layer": "sedac_bound",+ "defaultLayer": "true",+ "format": "image/png",+ "tileSize": [ 512, 512 ],+ "opacity": 0.95,+ "bringToFront": true,+ "transitionEffect": "none"+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ }+ }+ },++ "grump-v1-population-count_2000": {+ "name": "Population Density",+ "description": "SEDAC GRUMP v1 Population Count 2000",++ "product": "static",+ "type": "wms",++ "url": [+ "http://sedac.ciesin.columbia.edu/geoserver/ows"+ ],++ "parameters": {+ "layers": "grump-v1-population-count_2000",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ],+ "opacity": 0.55+ },++ "projections": {+ "geographic": {},+ "arctic": {}+ }+ },++ "ol_graticule": {+ "name": "Latitude-Longitude Lines",+ "description": "OpenLayers / Graticule Control",++ "product": "static",+ "type": "graticule",++ "projections": {+ "geographic": {}+ }+ },++ "MODIS_Terra_Data_No_Data": {+ "name": "Areas of No Data (mask)",+ "description": "Terra / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Terra_Data_No_Data",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ }+ }+ },++ "MODIS_Aqua_Data_No_Data": {+ "name": "Areas of No Data (mask)",+ "description": "Aqua / MODIS",++ "product": "daily",+ "type": "wmts",+ "startDate": "2012-04-07",++ "properties": {+ "layer": "MODIS_Aqua_Data_No_Data",+ "format": "image/png",+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ }+ }+ },++ "Terra_Orbit_Asc": {+ "name": "Orbital Track (Ascending)",+ "description": "Space-Track.org / Terra",++ "product": "daily",+ "type": "wms",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "Terra_Orbit_Asc",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "Terra_Orbit_Dsc": {+ "name": "Orbital Track (Descending)",+ "description": "Space-Track.org / Terra",++ "product": "daily",+ "type": "wms",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "Terra_Orbit_Dsc",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "Aqua_Orbit_Asc": {+ "name": "Orbital Track (Ascending)",+ "description": "Space-Track.org / Aqua",++ "product": "daily",+ "type": "wms",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "Aqua_Orbit_Asc",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "Aqua_Orbit_Dsc": {+ "name": "Orbital Track (Descending)",+ "description": "Space-Track.org / Aqua",++ "product": "daily",+ "type": "wms",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "Aqua_Orbit_Dsc",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "Aura_Orbit_Asc": {+ "name": "Orbital Track (Ascending)",+ "description": "Space-Track.org / Aura",++ "product": "daily",+ "type": "wms",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "Aura_Orbit_Asc",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "Aura_Orbit_Dsc": {+ "name": "Orbital Track (Descending)",+ "description": "Space-Track.org / Aura",++ "product": "daily",+ "type": "wms",++ "url": [+ "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"+ ],++ "parameters": {+ "layers": "Aura_Orbit_Dsc",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ]+ },++ "projections": {+ "geographic": {}+ }+ },++ "arctic_coastlines": {+ "name": "Coastlines",+ "description": "Polarview / Coastlines",++ "product": "static",+ "type": "wmts",++ "properties": {+ "layer": "arctic_coastlines",+ "format": "image/png",+ "tileSize": [ 512, 512 ],+ "bringToFront": "true",+ "transitionEffect": "none"+ },++ "projections": {+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "polarview:graticuleN": {+ "name": "Latitude-Longitude Lines",+ "description": "Polarview / Graticule",++ "product": "static",+ "type": "wms",++ "url": [+ "http://geos.polarview.aq/geoserver/wms?"+ ],++ "parameters": {+ "layers": "polarview:graticuleN",+ "format": "image/png",+ "transparent": "true",+ "bringToFront": "true",+ "transitionEffect": "none"+ },++ "properties": {+ "tileSize": [ 512, 512 ] ,+ "opacity": 0.75+ },++ "projections": {+ "arctic": {}+ }+ },++ "antarctic_coastlines": {+ "name": "Coastlines",+ "description": "ADD SCAR / Coastlines",++ "product": "static",+ "type": "wmts",++ "properties": {+ "layer": "antarctic_coastlines",+ "format": "image/png",+ "tileSize": [ 512, 512 ],+ "bringToFront": "true",+ "transitionEffect": "none"+ },++ "projections": {+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+ },++ "polarview:graticule3031_10x30": {+ "name": "Latitude-Longitude Lines",+ "description": "Polarview / Graticule",++ "product": "static",+ "type": "wms",++ "url": [+ "http://geos.polarview.aq/geoserver/wms?"+ ],++ "parameters": {+ "layers": "polarview:graticule3031_10x30",+ "format": "image/png",+ "transparent": "true"+ },++ "properties": {+ "tileSize": [ 512, 512 ] ,+ "opacity": 0.75,+ "bringToFront": "true",+ "transitionEffect": "none"+ },++ "projections": {+ "antarctic": {}+ }+ }+}+}++++\ No newline at end of filediff --git a/dev/map2/temporal/Temporal.css b/dev/map2/temporal/Temporal.cssnew file mode 100644index 000000000..7aa1b0a17--- /dev/null+++ b/dev/map2/temporal/Temporal.css@@ -0,0 +1,26 @@+#map {+ margin: 0;+ width: 100%;+ height: 100%;+ background-color: #000000;+}++.button {+ background-color: white;+ position: absolute;+ z-index: 10000;+ padding: 10px;+ left: 20px;+}++#previous {+ top: 40px;+}++#next {+ top: 100px;+}++#date {+ top: 150px;+}diff --git a/dev/map2/temporal/Temporal.html b/dev/map2/temporal/Temporal.htmlnew file mode 100644index 000000000..48c647252--- /dev/null+++ b/dev/map2/temporal/Temporal.html@@ -0,0 +1,20 @@+<?doctype html>+<html>+ <head>+ <title>Temporal Layers</title>++ <link rel="stylesheet" type="text/css" href="Temporal.css">++ <script type="text/javascript" src="../../../js/ext/jquery/jquery-1.6.4.js"></script>+ <script type="text/javascript" src="../../../js/ext/openlayers-2.12/OpenLayers.debug.js"></script>+ <script type="text/javascript" src="../../../js/Worldview.js"></script>+ <script type="text/javascript" src="../../../js/Worldview/OpenLayers/GIBS/TemporalLayerSet.js"></script>+ <script type="text/javascript" src="Temporal.js"></script>+ </head>+ <body>+ <div id="map"></div>+ <div id="previous" class="button">Previous</div>+ <div id="next" class="button">Next</div>+ <div id="date" class="button">Now</div>+ </body>+</html>\ No newline at end of filediff --git a/dev/map2/temporal/Temporal.js b/dev/map2/temporal/Temporal.jsnew file mode 100644index 000000000..7e3fa18f6--- /dev/null+++ b/dev/map2/temporal/Temporal.js@@ -0,0 +1,87 @@+$(function() {++ var resolutions = [+ 0.5625, 0.28125, 0.140625,+ 0.0703125, 0.03515625, 0.017578125,+ 0.0087890625, 0.00439453125, 0.002197265625+ ];++ var serverResolutions = [+ 0.5625, 0.28125, 0.140625,+ 0.0703125, 0.03515625, 0.017578125,+ 0.0087890625, 0.00439453125, 0.002197265625+ ];++ var EPSG_WGS_84 = "EPSG:4326";++ var map = new OpenLayers.Map({+ div: "map",+ maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90),+ projection: EPSG_WGS_84,+ fractionalZoom: false,+ resolutions: resolutions,+ allOverlays: true,+ controls: [+ new OpenLayers.Control.Navigation({+ dragPanOptions: {+ enableKinetic: true+ }+ }),+ new OpenLayers.Control.Zoom(),+ new OpenLayers.Control.LayerSwitcher(),+ ]+ });++ var modis = {+ name: "Corrected Reflectance (True Color)",+ url: "http://map1a.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi",+ layer: "MODIS_Terra_CorrectedReflectance_TrueColor",+ matrixSet: "EPSG4326_250m",+ format: "image/jpeg",+ buffer: 0,+ style: "",+ opacity: 1.0,+ projection: EPSG_WGS_84,+ //numZoomLevels: 9,+ maxResolution: 0.5625,+ //resolutions: resolutions,+ //serverResolutions: serverResolutions,+ visibility: true,+ tileSize: new OpenLayers.Size(512, 512),+ maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90),+ isBaseLayer: true,+ };++ var layerSet = Worldview.OpenLayers.GIBS.TemporalLayerSet({+ map: map,+ layerClass: OpenLayers.Layer.WMTS,+ options: modis+ });++ map.zoomToMaxExtent();++ var setDay = function(date) {+ currentDay = date;+ d = new Date(currentDay);+ $("#date").html(d.toISOString().split("T")[0]);+ layerSet.setDay(new Date(currentDay));+ };++ setDay(Date.now());++ $("#previous").click(function() {+ setDay(currentDay - (1000 * 60 * 60 * 24));+ });++ $("#next").click(function() {+ setDay(currentDay + (1000 * 60 * 60 * 24));++ });++ window.stats = function() {+ console.log("Map: " + map.getNumLayers());+ var stats = layerSet.getStatistics();+ console.log("Stats: quick(" + stats.active + "), redraw(" + stats.inactive + ")");+ };++});diff --git a/doc/NaturalDocs/Menu.txt b/doc/NaturalDocs/Menu.txtindex 43e57597e..59aa71927 100644--- a/doc/NaturalDocs/Menu.txt+++ b/doc/NaturalDocs/Menu.txt@@ -54,14 +54,35 @@ Group: Development Notes {Group: Code Reference {+ File: Logging (/Users/jmcgann/Code/Aptana/worldview/js/Logging.js)File: OpenLayers.Tile.Canvas (/Users/jmcgann/Code/Aptana/worldview/js/OpenLayers/Tile/Canvas.js)File: SOTE.util (/Users/jmcgann/Code/Aptana/worldview/js/util.js)File: Worldview (/Users/jmcgann/Code/Aptana/worldview/js/Worldview.js)Group: Worldview {+ File: OpenLayers (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers.js)File: Visual (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual.js)+ Group: OpenLayers {++ File: DailyProduct (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers/DailyProduct.js)+ File: ProductMap (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers/ProductMap.js)+ File: StaticProduct (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers/StaticProduct.js)+ } # Group: OpenLayers++ Group: JSON {++ File: MapConfig (/Users/jmcgann/Code/Aptana/worldview/doc/Topics/Worldview/JSON/MapConfig.txt)++ Group: MapConfig {++ File: Product (/Users/jmcgann/Code/Aptana/worldview/doc/Topics/Worldview/JSON/MapConfig/Product.txt)+ File: Projection (no auto-title, /Users/jmcgann/Code/Aptana/worldview/doc/Topics/Worldview/JSON/MapConfig/Projection.txt)+ } # Group: MapConfig++ } # Group: JSON+Group: Visual {File: ColorBar (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/ColorBar.js)@@ -79,6 +100,7 @@ Group: Code Reference {File: TestSuite (/Users/jmcgann/Code/Aptana/worldview/test/lib/TestSuite.js)File: TestSuite.Patcher (/Users/jmcgann/Code/Aptana/worldview/test/lib/TestSuite/Patcher.js)+File: TestSuite.TestCases (/Users/jmcgann/Code/Aptana/worldview/test/lib/TestSuite/TestCases.js)Group: Index {diff --git a/doc/NaturalDocs/Menu.txt.bak b/doc/NaturalDocs/Menu.txt.baknew file mode 100644index 000000000..9f1df9266--- /dev/null+++ b/doc/NaturalDocs/Menu.txt.bak@@ -0,0 +1,115 @@+Format: 1.52+++Title: Worldview++# You can also add a sub-title to your menu like this:+# SubTitle: [subtitle]++# You can add a footer to your documentation like this:+# Footer: [text]+# If you want to add a copyright notice, this would be the place to do it.+Timestamp: Updated mm/dd/yyyy+# m - One or two digit month. January is "1"+# mm - Always two digit month. January is "01"+# mon - Short month word. January is "Jan"+# month - Long month word. January is "January"+# d - One or two digit day. 1 is "1"+# dd - Always two digit day. 1 is "01"+# day - Day with letter extension. 1 is "1st"+# yy - Two digit year. 2006 is "06"+# yyyy - Four digit year. 2006 is "2006"+# year - Four digit year. 2006 is "2006"+++# --------------------------------------------------------------------------+#+# Cut and paste the lines below to change the order in which your files+# appear on the menu. Don't worry about adding or removing files, Natural+# Docs will take care of that.+#+# You can further organize the menu by grouping the entries. Add a+# "Group: [name] {" line to start a group, and add a "}" to end it.+#+# You can add text and web links to the menu by adding "Text: [text]" and+# "Link: [name] ([URL])" lines, respectively.+#+# The formatting and comments are auto-generated, so don't worry about+# neatness when editing the file. Natural Docs will clean it up the next+# time it is run. When working with groups, just deal with the braces and+# forget about the indentation and comments.+#+# You can use this file on other computers even if they use different+# directories. As long as the command line points to the same source files,+# Natural Docs will be able to correct the locations automatically.+#+# --------------------------------------------------------------------------+++Group: Development Notes {++ File: Documentation (/Users/jmcgann/Code/Aptana/worldview/doc/Topics/Documentation.txt)+ File: Testing (/Users/jmcgann/Code/Aptana/worldview/doc/Topics/Testing.txt)+ } # Group: Development Notes++Group: Code Reference {++ File: Logging (/Users/jmcgann/Code/Aptana/worldview/js/Logging.js)+ File: OpenLayers.Tile.Canvas (/Users/jmcgann/Code/Aptana/worldview/js/OpenLayers/Tile/Canvas.js)+ File: SOTE.util (/Users/jmcgann/Code/Aptana/worldview/js/util.js)+ File: Worldview (/Users/jmcgann/Code/Aptana/worldview/js/Worldview.js)++ Group: Worldview {++ File: OpenLayers (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers.js)+ File: OpenLayers.DailyProduct (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers/DailyProduct.js)+ File: OpenLayers.ProductMap (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers/ProductMap.js)+ File: OpenLayers.StaticProduct (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/OpenLayers/StaticProduct.js)+ File: Visual (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual.js)++ Group: JSON {++ File: MapConfig (/Users/jmcgann/Code/Aptana/worldview/doc/Topics/Worldview/JSON/MapConfig.txt)++ Group: MapConfig {++ File: Product (/Users/jmcgann/Code/Aptana/worldview/doc/Topics/Worldview/JSON/MapConfig/Product.txt)+ File: Projection (no auto-title, /Users/jmcgann/Code/Aptana/worldview/doc/Topics/Worldview/JSON/MapConfig/Projection.txt)+ } # Group: MapConfig++ } # Group: JSON++ Group: Visual {++ File: ColorBar (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/ColorBar.js)+ File: ColorHSL (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/ColorHSL.js)+ File: ColorRGBA (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/ColorRGBA.js)+ File: Lookup (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/Lookup.js)+ File: Palette (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/Palette.js)+ File: PaletteSelector (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/PaletteSelector.js)+ File: StopRGBA (/Users/jmcgann/Code/Aptana/worldview/js/Worldview/Visual/StopRGBA.js)+ } # Group: Visual++ } # Group: Worldview++ } # Group: Code Reference++File: TestSuite (/Users/jmcgann/Code/Aptana/worldview/test/lib/TestSuite.js)+File: TestSuite.Patcher (/Users/jmcgann/Code/Aptana/worldview/test/lib/TestSuite/Patcher.js)+File: TestSuite.TestCases (/Users/jmcgann/Code/Aptana/worldview/test/lib/TestSuite/TestCases.js)++Group: Index {++ Index: Everything+ Class Index: Classes+ Function Index: Functions+ Property Index: Properties+ Constant Index: Constants+ } # Group: Index++++##### Do not change or remove these lines. #####+Data: 1(D3333a6GH63lE9`p\\30ufG3KItp\p37uHof/8G73l6)+Data: 1(h3333a6GH63lE9`p\\30ufG3KItp\p37uHof/8G73fu93LuI896)+Data: 1(T3333a6GH63lE9`p\\30ufG3KItp\p37uHof/8G73tG6t3o8Y)diff --git a/doc/Topics/Worldview/JSON/MapConfig.txt b/doc/Topics/Worldview/JSON/MapConfig.txtnew file mode 100644index 000000000..cef91f907--- /dev/null+++ b/doc/Topics/Worldview/JSON/MapConfig.txt@@ -0,0 +1,42 @@+Class: Worldview.JSON.MapConfig+Map configuration provided at the data/map endpoint.++Property: defaultProjection+The default projection used when the application starts. Must be one of the+names defined in the <projections> section.++Property: projections+Configuration values for each projection supported in Worldview of type+<Projection>. Keyed by projection name.++Example:+(begin code)+"projections": {+ "geographic": {+ ...+ },+ "arctic": {+ ...+ }+}+(end code)++Property: products+Configration values for each product supported in Worldview of type+<Worldview.JSON.MapConfig.Product>. Keyed by product name.++Example:+(begin code)+"products" : {+ "MODIS_Terra_CorrectedReflectance_TrueColor": {+ ...+ },+ "sedac_bound": {+ ...+ }+}+(end code)++++diff --git a/doc/Topics/Worldview/JSON/MapConfig/Product.txt b/doc/Topics/Worldview/JSON/MapConfig/Product.txtnew file mode 100644index 000000000..3aef5b3fb--- /dev/null+++ b/doc/Topics/Worldview/JSON/MapConfig/Product.txt@@ -0,0 +1,124 @@+Class: Worldview.JSON.MapConfig.Product+Defines a product available within Worldview.++Any property used to create an OpenLayers.Layer object can be provided in this+object. Properties specific for a certain projection can be placed in the+<projections> property and these will be copied over and overrides any+property defined in the general section.++The properties listed below are the required properties.++Example:+(begin code)+"MODIS_Terra_CorrectedReflectance_TrueColor": {+ "layer": "MODIS_Terra_CorrectedReflectance_TrueColor",+ "productClass": "Worldview.OpenLayers.DailyProduct",+ "layerClass": "OpenLayers.Layer.WMTS",++ "name": "Corrected Reflectance (True Color)",+ "description": "Terra / MODIS",++ "defaultLayer": "true",+ "start_date": "2012-04-07",+ "format": "image/jpeg",+ "tileSize": [ 512, 512 ],++ "projections": {+ "geographic": {+ "url": [+ "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"+ ],+ "maxExtent": [-180, -90, 180, 90],+ "matrixSet": "EPSG4326_250m",+ "maxResolution": 0.5625+ },+ "arctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3995_250m",+ "maxResolution": 8192.0+ },+ "antarctic": {+ "url": [+ "http://map1a.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1b.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi",+ "http://map1c.vis.earthdata.nasa.gov/wmts-antarctic/wmts.cgi"+ ],+ "maxExtent": [-4194304, -4194304, 4194304, 4194304],+ "matrixSet": "EPSG3031_250m",+ "maxResolution": 8192.0+ }+ }+}+(end code)++Property: layer+Identifier used to reference the layer from the remote map service.++Property: productClass+The Product object to create to manage the layers for this product. Either+<Worldview.OpenLayers.DailyProduct> or <Worldview.OpenLayers.StaticProduct>.++Property: layerClass+The OpenLayers.Layer class used to create layers for this product as needed.++Property: name+Descriptive name of this product, displayed to the end user in Worldview.++Property: description+Additional information about this product, displayed to the end user in+Worldview.++Property: defaultLayer+Set to "true" if this layer should be selected when the application starts.++Property: start_date+First date that data is available for this product as a string in YYYY-DD-MM+format.++Property: format+MIME type of the image to be returned from the map server (e.g., image/jpeg,+image/png)++Property: tileSize+Array of width and height of the tile, in pixels, to request from the+map server.++Property: url+Either a string or an array of strings containing URLs to the map service+endpoint.++Property: maxExtent+Array containing the minimum longitude, minimum latitude, maximum longitude,+and maximum latitude for all data available for this product. Must be+specified using projected units.++Property: matrixSet+The matrix set to request from the remote server.++Property: maxResolution+The maximum resolution available for this product.++Property: projections+An object containing any of the listed properties above that are specific+to a certain projection. The object should be keyed by the projection name.++Example:+(begin code)+"projections": {+ "geographic" {+ "maxExtent": [-180, -90, 180, 90]+ },+ "arctic": {+ "maxExtent": [-4194304, -4194304, 4194304, 4194304]+ }+}+(end code)++diff --git a/doc/Topics/Worldview/JSON/MapConfig/Projection.txt b/doc/Topics/Worldview/JSON/MapConfig/Projection.txtnew file mode 100644index 000000000..2191a3b65--- /dev/null+++ b/doc/Topics/Worldview/JSON/MapConfig/Projection.txt@@ -0,0 +1,40 @@+Class: Worldview.JSON.MapConfig.Projection+Defines a map projection to be available within Worldview.++Any property used to create an OpenLayers.Map object can be provided in this+object. The properties listed below are the required properties.++Example:+(begin code)+"geographic": {+ "projection": "EPSG:4326",+ "name": "geographic",+ "maxExtent": [-180, -180, 90, 90],+ "numZoomLevels": 9,+ "resolutions": [+ 0.5625, 0.28125, 0.140625,+ 0.0703125, 0.03515625, 0.017578125,+ 0.0087890625, 0.00439453125, 0.002197265625+ ]+}+(end code)++Property: projection+Projection in the form of "EPSG:x" where x is the corresponding EPSG code+for this projection.++Property: name+The name of this projection used in Worldview to reference this projection+(i.e. "geographic", "arctic", "antarctic").++Property: maxExtent+An array containing the minimum longitude, minimum latitude, maximum+longitude, and the maximum latitude for this projection.++Property: numZoomLevels+Number of zoom levels appropriate for all data products.++Property: resolutions+Array of map resolutions as map units per pixel in decending order. There+should be as many resolution entries as there are <numZoomLevels>+diff --git a/index.html b/index.htmlindex 112186228..dc953b779 100644--- a/index.html+++ b/index.html@@ -61,10 +61,11 @@<!-- js.dev --> <script type="text/javascript" src="js/ext/yui/combo-event-dragdrop-container-min.js"></script><!-- External Javascript includes -->- <!-- js.dev --> <script type="text/javascript" src="js/ext/openlayers-2.12/OpenLayers.js?mobile"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/ext/openlayers-2.12/OpenLayers.debug.js?mobile"></script><!-- js.dev --> <script type="text/javascript" src="js/ext/datejs/date.js"></script><!-- js.dev --> <script type="text/javascript" src="js/ext/jcrop/jcrop.js"></script>+<!-- SOTE component includes --><!-- js.dev --> <script type="text/javascript" src="js/component.js?v=0.3.0"></script><!-- js.dev --> <script type="text/javascript" src="js/registry.js?v=0.3.0"></script>@@ -80,6 +81,18 @@<!-- js.dev --> <script type="text/javascript" src="js/switch.js?v=0.3.0"></script><!-- js.dev --> <script type="text/javascript" src="js/selector.js?v=0.3.0"></script><!-- js.dev --> <script type="text/javascript" src="js/sote.js?v=0.3.0"></script>++ <!-- js.dev --> <script type="text/javascript" src="js/Logging.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/OpenLayers.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/OpenLayers/ProductMap.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/OpenLayers/Product.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/OpenLayers/StaticProduct.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/OpenLayers/DailyProduct.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/OpenLayers/GraticuleLayer.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/Widget/Map.js"></script>+ <!-- js.dev --> <script type="text/javascript" src="js/Worldview/Widget/WorldviewMap.js"></script>+<!-- js.dev --> <script type="text/javascript" src="js/main.js?v=0.3.0"></script></head>diff --git a/js/Logging.js b/js/Logging.jsnew file mode 100644index 000000000..1aae330c8--- /dev/null+++ b/js/Logging.js@@ -0,0 +1,203 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++/**+ * Namespace: Logging+ * Simple logging utility.+ *+ * For basic logging+ * (begin code)+ * var log = Logger.getLogger()+ * log.message("This is a message");+ * (end code)+ *+ * For debugging messages that can be turned on and off+ * (begin code)+ * var log = Logger.getLogger()+ * log.debug("This is not printed");+ * Logging.debug()+ * log.debug("This is printed");+ * (end code)+ *+ * Assign names to loggers to turn debug logging on or off for certain loggers.+ * (begin code)+ * var logA = Logger.getLogger("A");+ * var logB = Logger.getLogger("B");+ * Logging.debug("B");+ * logA.debug("This is not printed");+ * logB.debug("This is printed");+ * (end code)+ *+ * There is no hierarchy of loggers as in log4j. Turning on debug logging+ * for a given name only enables loggers that exactly match that name.+ *+ * This delgates to the corresponding console methods if available, otherwise+ * it delgates to console.log. If console is not defined, nothing is+ * printed out.+ */+(function(ns) {++ var debugging = {};+ var debuggingAll = false;++ /**+ * Function: debug+ * Enables debug logging.+ *+ * Parameters:+ * namespace - If specified, this enables debug logging for all <Loggers>+ * with the given namespace. If not specified, this enables debug logging+ * for all <Loggers>.+ */+ ns.debug = function(namespace) {+ if ( namespace === undefined ) {+ debuggingAll = true;+ }+ debugging[namespace] = true;+ };++ /**+ * Function: undebug+ * Disables debug logging.+ *+ * Parameters:+ * namespace - If specified, this disables logging for all <Loggers>+ * with the given namespace. If not specified, this disables debug logging+ * for all <Loggers> except for those explicitly enabled.+ */+ ns.undebug = function(namespace) {+ if ( namespace === undefined ) {+ debuggingAll = false;+ } else {+ if ( namespace in debugging ) {+ delete debugging[namespace];+ }+ }+ };++ /**+ * Class: Logging.Logger+ * Sample logger+ *+ * Constructor: Logger+ * Creates a new instance.+ *+ * Parameters:+ * namespace - The name given to this logger.+ */+ ns.Logger = function(namespace) {++ var self = {};++ /**+ * Method: message+ * Prints an error message to the console. Uses console.log or does+ * nothing if console does not exist.+ *+ * Parameters:+ * message - The message to print to the console.+ */+ self.message = function(message) {+ if ( console ) {+ console.log(message);+ }+ };++ /**+ * Method: error+ * Prints an error message to the console. Uses console.error if+ * it exists, otherwise uses console.log. Does nothing if console+ * does not exist.+ *+ * Parameters:+ * message - The message to print to the console.+ */+ self.error = function(message) {+ if ( console ) {+ if ( console.error ) {+ console.error(message);+ } else {+ console.log(message);+ }+ }+ };++ /**+ * Method: warn+ * Prints an warning message to the console. Uses console.warn if+ * it exists, otherwise uses console.log. Does nothing if console+ * does not exist.+ *+ * Parameters:+ * message - The message to print to the console.+ */+ self.warn = function(message) {+ if ( console ) {+ if ( console.warn ) {+ console.warn(message);+ } else {+ console.log(message);+ }+ }+ };++ /**+ * Method: info+ * Prints an information message to the console. Uses console.info if+ * it exists, otherwise uses console.log. Does nothing if console+ * does not exist.+ *+ * Parameters:+ * message - The message to print to the console.+ */+ self.info = function(message) {+ if ( console ) {+ if ( console.info ) {+ console.info(message);+ } else {+ console.log(message);+ }+ }+ };++ /**+ * Method: trace+ * Prints a stack trace to the console. If console.trace does not+ * exist, this method does nothing.+ */+ self.trace = function() {+ if ( console && console.trace ) {+ console.trace();+ }+ };++ /**+ * Method: debug+ * Prints a debug message to the console if debugging is enabled.+ * Debugging can be enabled by calling Logging.debug with the namespace+ * of this logger, or by calling Logging.debug with no parameters.+ * If the console object does not exist, this method does nothin.+ *+ * Parameters:+ * message - The message to print to the console.+ */+ self.debug = function(message) {+ if ( debuggingAll ) {+ self.message(message);+ } else if ( namespace !== undefined && namespace in debugging ) {+ self.message(message);+ }+ }++ return self;+ };++}(window.Logging = window.Logging || {}));diff --git a/js/Worldview.js b/js/Worldview.jsindex 24ff13e70..29c229671 100644--- a/js/Worldview.js+++ b/js/Worldview.js@@ -3,6 +3,14 @@*/(function(ns) {+ var log = Logging.Logger("Worldview");++ /**+ * Constant: NAME+ * Official name of this application.+ */+ ns.NAME = "EOSDIS Worldview";+/*** Constant: VERSION* Release version string.@@ -42,17 +50,6 @@return obj;};- /**- * Function: log- * Logs a message to the browser console.- *- * Parameters:- * message - The message to log to the console.- */- ns.log = function(message) {- console.log(message);- };-/*** Function: error* Worldview general error handler. The error is reported to the browser@@ -60,17 +57,15 @@* found, opens a notification panel for the end user.** Parameters:- * message - Error message to display to the user+ * message - Error message to display to the user.* cause - Description of the error that does not need to be shown to* the user, usually the message of the exception that was* caught.*/ns.error = function(message, cause) {- ns.log("ERROR: " + message);- if ( cause !== undefined ) {- ns.log("Cause: " + cause);- }-+ var causeMessage = ( cause === undefined ) ? "" : ": " + cause;+ log.error(message + causeMessage);+if ( window.YAHOO && window.YAHOO.widget &&window.YAHOO.widget.Panel ) {o = new YAHOO.widget.Panel("WVerror", {@@ -79,7 +74,7 @@visible: false});o.setHeader(' Warning');- o.setBody(message);+ o.setBody("An unexpected error has occurred.<br/><br/>" + message);o.render(document.body);o.show();o.center();@@ -88,6 +83,130 @@});}};++ /**+ * Function: size+ * Gets the number of properties in an object. This only includes+ * properties where hasOwnProperty returns true.+ *+ * Parameters:+ * size - Object to count the number of properties+ *+ * Returns:+ * Number of properties+ */+ ns.size = function(object) {+ var size = 0;+ for ( key in object ) {+ if ( object.hasOwnProperty(key) ) {+ size++;+ }+ }+ return size;+ };++ /**+ * Function: getObjectByPath+ * Returns the object specified by a string path.+ *+ * Parameters:+ * path - The path to the object as a string, delimited by periods.+ *+ * Returns:+ * The object+ *+ * Throws:+ * An exception if any object leading up to the leaf object is undefined.+ *+ * Example:+ * (begin code)+ * > Foo.Bar.baz = "hello";+ * > Worldview.getObjectByPath("Foo.Bar.baz");+ * "hello"+ * (end code)+ */+ ns.getObjectByPath = function(path) {+ var nodes = path.split(".");+ var parent = window;+ $.each(nodes, function(index, node) {+ if ( parent[node] === undefined ) {+ throw "In " + path + ", " + node + " is undefined";+ }+ parent = parent[node];+ });+ return parent;+ };++ ns.queryStringToObject = function(queryString) {+ var parameters = queryString.split("&");+ result = {};+ for ( var i = 0; i < parameters.length; i++ ) {+ var fields = parameters[i].split("=");+ result[fields[0]] = fields[1];+ }+ return result;+ };+ /**+ * Function: extractFromQuery+ *+ * Extracts the value of the given key from the querystring.+ *+ * Parameters:+ * key - Item to be extracted+ * qa - Query string to extract from+ *+ * Returns:+ * The value associated with the given key in the querystring+ */+ ns.extractFromQuery = function(key, qs) {+ var regex = new RegExp("[\\?&#]*"+key+"=([^&#]*)");+ var val = regex.exec(qs);+ if(val == null)+ return "";+ else+ return val[1];+ };++ ns.ajaxError = function(handler) {+ return function(jqXHR, textStatus, errorThrown) {+ handler(errorThrown);+ };+ };++ /**+ * Function: toISODateString+ * Converts a date object to a string with the date is ISO format.+ *+ * Example:+ * (begin code)+ * > Worldview.toISODateString(new Date(2013, 03, 15));+ * "2013-03-15"+ * (end code)+ *+ * Parameters:+ * date - Date object to convert+ *+ * Returns:+ * The date as a string in "YYYY-MM-DD" format.+ */+ ns.toISODateString = function(date) {+ return date.toISOString().split("T")[0];+ };++ /**+ * Function: now+ * Gets the current date and time as a Date object. It is useful to+ * call this function instead of directly invoking the Date constructor+ * for mocking out during test.+ *+ * Returns:+ * Date object with the current date and time.+ */+ ns.now = function() {+ return new Date();+ };+})(window.Worldview = window.Worldview || {});+diff --git a/js/Worldview/OpenLayers.js b/js/Worldview/OpenLayers.jsnew file mode 100644index 000000000..2acdaa2d2--- /dev/null+++ b/js/Worldview/OpenLayers.js@@ -0,0 +1,55 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++/**+ * Namespace: Worldview.OpenLayers+ * Worldview specific code when using OpenLayers.+ */+Worldview.namespace("OpenLayers");++$(function(ns) {++ /**+ * Constant: COORDINATE_CONTROLS+ * An object that contains OpenLayers.Contorl.MousePosition objects+ * that update the current latitude/longitude values on the map as the+ * mouse moves. Keyed by projection name, either "geographic", "arctic",+ * or "antarctic".+ *+ * Example:+ * (begin code)+ * var contorl = Worldview.OpenLayers.COORDINATE_CONTROLS["geographic"];+ * (end code)+ */+ ns.COORDINATE_CONTROLS = {+ "geographic": new OpenLayers.Control.MousePosition({+ formatOutput: function(mouseLonLat) {+ return mouseLonLat.lon.toFixed(3) + "°, " ++ mouseLonLat.lat.toFixed(3) + "°";+ },+ }),+ "arctic": new OpenLayers.Control.MousePosition({+ formatOutput: function(mouseLonLat) {+ return "EPSG:3031 coords: " ++ Math.round(mouseLonLat.lon) + "m, " ++ Math.round(mouseLonLat.lat) + "m";+ }+ }),+ "antarctic": new OpenLayers.Control.MousePosition({+ formatOutput: function(mouseLonLat) {+ return "EPSG:3995 coords: " ++ Math.round(mouseLonLat.lon) + "m, " ++ Math.round(mouseLonLat.lat) + "m";+ },+ })+ };++}(Worldview.OpenLayers));diff --git a/js/Worldview/OpenLayers/DailyProduct.js b/js/Worldview/OpenLayers/DailyProduct.jsnew file mode 100644index 000000000..0d5c99263--- /dev/null+++ b/js/Worldview/OpenLayers/DailyProduct.js@@ -0,0 +1,231 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++Worldview.namespace("OpenLayers");++/**+ * Class: Worldview.OpenLayers.DailyProduct+ * Product that updates on a daily basis.+ *+ * A requirement in Worldview is to be able to slide between several dates+ * and quickly see the changes per day without redrawing the map. This trick is+ * performed by adding a new layer for each day selected and setting the+ * opacity for the other layers to zero. Once the map moves, the "cached"+ * layers are invalidated and eligbile for removal the next time the map+ * needs to be redrawn.+ *+ * Constructor: DailyProduct+ * Creates a new instance.+ *+ * Parameters:+ * map - The map object that layers will be added and removed from.+ * config - Options passed to the OpenLayers.Layer constructor to create+ * each layer. This object must also have one other property:+ * layerClass which defines the type of layer to create (e.g.,+ * OpenLayers.Layer.WMTS)+ */+Worldview.OpenLayers.DailyProduct = function(map, config) {++ var self = Worldview.OpenLayers.Product(config);++ // The current z-index for all layers.+ var zIndex = 0;++ // The function used to create a new layer+ var createLayer;++ // The layer that is currently displayed on the screen and all layers+ // that have their opacity set to zero for quick display when moving+ // the date.+ var validLayers = {};++ // Layers that are no longer valid because the map has moved. These+ // can be removed on the next map redrawn+ var invalidLayers = {};++ // The layer that is currently visible and seen by the user+ var currentLayer = null;++ // The day of the data displayed on the map+ var currentDay;++ //-------------------------------------------------------------------------+ // Public+ //-------------------------------------------------------------------------++ var init = function() {+ self.setDay(Worldview.now());++ map.events.register("movestart", self, onMoveStart);+ map.events.register("zoomend", self, onZoomEnd);+ };++ /**+ * Method: setDay+ * Changes the map to display the product for the given day.+ *+ * Parameters:+ * d - The day to display.+ */+ self.setDay = function(d) {+ currentDay = Worldview.toISODateString(d);++ var previousLayer = currentLayer;++ // If a layer was visible, hide it.+ if ( previousLayer ) {+ previousLayer.setOpacity(0);+ }++ // If the layer has already been created, set it as the current+ // lyaer.+ if ( currentDay in validLayers ) {+ currentLayer = validLayers[currentDay];++ // If the layer was invalidated and scheduled for removal, reuse+ // it and bring it back to the valid set+ } else if ( currentDay in invalidLayers ) {+ currentLayer = invalidLayers[currentDay];+ validLayers[currentDay] = currentLayer;+ delete invalidLayers[currentDay];++ // Otherwise, create a new layer+ } else {+ currentLayer = self.createLayer();+ currentLayer.mergeNewParams({ time: currentDay });+ validLayers[currentDay] = currentLayer;+ map.addLayer(currentLayer);+ }++ // Make sure the layer is visible.+ currentLayer.setOpacity(1);+ if ( currentLayer.getVisibility() === false ) {+ currentLayer.setVisibility(true);+ }++ // The visible layer is one level higher than all the other layers+ if ( previousLayer ) {+ previousLayer.setZIndex(zIndex);+ }+ currentLayer.setZIndex(zIndex + 1);+ };++ /**+ * Method: getStatistics+ * Gets number of valid and invalid layers.+ *+ * Returns:+ * A object containing two properites:+ * - valid: The number of layers that are active and can be used for+ * quickly flipping through days.+ * - invalid: The number of layers that can no longer be used for display+ * and will be removed the next time the map is drawn.+ */+ self.getStatistics = function() {+ return {+ valid: Worldview.size(validLayers),+ invalid: Worldview.size(invalidLayers)+ };+ };++ /**+ * Method: setZIndex+ * Sets the z-index for all layers in this product.+ *+ * Parameters:+ * index - The z-index to set. All layers are set with this z-index+ * except for the visible layer which is set to index + 1.+ */+ self.setZIndex = function(index) {+ zIndex = index;+ refreshZOrder();+ };++ /**+ * Method: dispose+ * Remove all layers from the map.+ */+ self.dispose = function() {+ $.each(validLayers, function(index, layer) {+ map.removeLayer(layer);+ });+ validLayers = {};+ $.each(invalidLayers, function(index, layer) {+ map.removeLayer(layer);+ })+ invalidLayers = {};+ map.events.unregister("movestart", self, onMoveStart);+ map.events.unregister("zoomend", self, onZoomEnd);+ }++ //-------------------------------------------------------------------------+ // Private+ //-------------------------------------------------------------------------++ /*+ * Sets the z-index on all layers.+ */+ var refreshZOrder = function() {+ $.each(validLayers, function(i, layer) {+ layer.setZIndex(zIndex);+ });+ $.each(invalidLayers, function(i, layer) {+ layer.setZIndex(zIndex);+ });+ currentLayer.setZIndex(zIndex + 1);+ };++ /*+ * Hide all layers that are not currently being displayed and move them+ * to the invalid set.+ */+ var invalidate = function() {+ if ( Worldview.size(validLayers) <= 1 ) {+ return;+ }++ for ( var day in validLayers ) {+ if ( validLayers.hasOwnProperty(day) ) {+ if ( day !== currentDay ) {+ invalidLayers[day] = validLayers[day];+ invalidLayers[day].setVisibility(false);+ }+ }+ }+ validLayers = {};+ validLayers[currentDay] = currentLayer;+ };++ /*+ * Remove all layers in the invalid set from the map.+ */+ var purge = function() {+ invalidate();+ for ( var day in invalidLayers ) {+ if ( map.getLayerIndex(invalidLayers[day]) >= 0 ) {+ map.removeLayer(invalidLayers[day]);+ }+ }+ invalidLayers = {};+ refreshZOrder();+ };++ var onMoveStart = function() {+ invalidate();+ };++ var onZoomEnd = function() {+ purge();+ };++ init();+ return self;+}diff --git a/js/Worldview/OpenLayers/GraticuleLayer.js b/js/Worldview/OpenLayers/GraticuleLayer.jsnew file mode 100644index 000000000..02b1919a5--- /dev/null+++ b/js/Worldview/OpenLayers/GraticuleLayer.js@@ -0,0 +1,67 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++Worldview.namespace("OpenLayers");++Worldview.OpenLayers.GraticuleLayer = OpenLayers.Class(OpenLayers.Layer, {++ graticuleLineStyle: null,+ graticuleLabelStyle: null,+ graticule: null,++ initialize: function(name, options) {+ OpenLayers.Layer.prototype.initialize.apply(this, arguments);++ graticuleLineStyle = new OpenLayers.Symbolizer.Line({+ strokeColor: '#AAAAAA',+ strokeOpacity: 0.95,+ strokeWidth: 1.35,+ strokeLinecap: 'square',+ strokeDashstyle: 'dot'+ });++ graticuleLabelStyle = new OpenLayers.Symbolizer.Text({+ fontFamily: 'Gill Sans',+ fontSize: '16',+ fontWeight: '550',+ fontColor: '#0000e1',+ fontOpacity: 1.0+ });+++ },++ setMap: function(map) {+ OpenLayers.Layer.prototype.setMap.apply(this, arguments);++ graticule = new OpenLayers.Control.Graticule({+ layerName: 'ol_graticule_control',+ numPoints: 2,+ labelled: true,+ lineSymbolizer: graticuleLineStyle,+ labelSymbolizer: graticuleLabelStyle+ });++ map.addControl(graticule);+ },++ removeMap: function(map) {+ OpenLayers.Layer.prototype.removeMap.apply(this, arguments);+ map.removeControl(graticule);+ graticule.destroy();+ graticule = null;+ },++ /*+ * Name of this class per OpenLayers convention.+ */+ CLASS_NAME: "Worldview.OpenLayers.GraticuleLayer"+});diff --git a/js/Worldview/OpenLayers/Product.js b/js/Worldview/OpenLayers/Product.jsnew file mode 100644index 000000000..fb19a14a2--- /dev/null+++ b/js/Worldview/OpenLayers/Product.js@@ -0,0 +1,54 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++Worldview.namespace("OpenLayers");++Worldview.OpenLayers.Product = function(c) {++ var self = {};+ var config;++ self.bringToFront = false;++ var init = function() {+ config = $.extend(true, {}, c);++ var prop = config.properties;+ if ( prop.style === undefined ) { prop.style = ""; }+ if ( prop.tileSize ) {+ prop.tileSize = new OpenLayers.Size(prop.tileSize[0],+ prop.tileSize[1]);+ }+ if ( config.properties.bringToFront === true ) {+ self.bringToFront = true;+ }+ if ( config.properties.transitionEffect === undefined ) {+ config.properties.transitionEffect = "resize";+ }+ };++ self.createLayer = function() {+ if ( config.type === "wms" ) {+ return new OpenLayers.Layer.WMS(config.name, config.url,+ config.parameters, config.properties);+ } else if ( config.type === "wmts") {+ return new OpenLayers.Layer.WMTS(config.properties);+ } else if ( config.type === "graticule") {+ return new Worldview.OpenLayers.GraticuleLayer(config.name,+ config.properties);+ } else {+ throw "Unsupported layer type: " + config.type;+ }+ };++ init();+ return self;+}diff --git a/js/Worldview/OpenLayers/ProductMap.js b/js/Worldview/OpenLayers/ProductMap.jsnew file mode 100644index 000000000..6823a35d6--- /dev/null+++ b/js/Worldview/OpenLayers/ProductMap.js@@ -0,0 +1,442 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++Worldview.namespace("OpenLayers");++/**+ * Class: Worldview.OpenLayers.ProductMap+ * Map object that handles GIBS products.+ *+ * Constructor: ProductMap+ * Creates a new instance+ *+ * Parameters:+ * containerId - The identifier of the HTML DOM element to add the map objects+ * to.+ * mapConfig - Configuration for the maps and products of type+ * <MapConfig>.+ *+ * Throws:+ * An exception if no DOM element exists with the provided containerId.+ */+Worldview.OpenLayers.ProductMap = function(containerId, mapConfig, component) {++ var log = Logging.Logger("Worldview.Map");+ var self = {};++ // Map objects, one for each supported projection+ var activeMaps = {};++ // Configurations for each available product+ var productConfigs = {};++ // Current set of products that have been added to the map, one set+ // for each supported projection.+ var activeProducts = {};++ // Display products on the map for this day+ var currentDay = new Date();++ //-------------------------------------------------------------------------+ // Public+ //-------------------------------------------------------------------------++ /**+ * Property: map+ * OpenLayers.Map object used for the currently selected projection+ * (read only).+ */+ self.map = null;++ /**+ * Property: products+ * Array containing the name of each prodcut that is visible on the map for+ * the currently selected projection (read only).+ */+ self.products = null;++ /**+ * Property: projection+ * Current map projection (read only). Set via <setProjection>.+ */+ self.projection = null;++ var init = function() {+ var $container = $("#" + containerId);+ if ( $container.length === 0 ) {+ throw "No container for ProductMap: " + containerId;+ }++ // Create map objects, one for each projection.+ $.each(mapConfig.projections, function(projection, config) {+ config = validateMapConfig(config);+ var id = "map-" + projection;++ var newMap = createMap($container, id, projection, config);+ log.debug("newMap projection: " + newMap.projection);++ // Put in a bogus layer to act as the base layer to make the+ // map happy for setting up the starting location+ newMap.addLayer(new OpenLayers.Layer({+ isBaseLayer: true+ }));++ // If a starting location is provided, go there otherwise+ // zoom to max extent+ if ( config.startCenter || config.startZoom ) {+ var startCenter = config.startCenter || [0, 0];+ var startZoom = config.startZoom || 0;+ log.debug(projection + " start: " + startCenter + ", " ++ startZoom);+ newMap.setCenter(startCenter, startZoom);+ } else {+ log.debug(projection + " start: maxExtent");+ newMap.zoomToMaxExtent();+ }++ newMap.products = {};+ activeMaps[projection] = newMap;+ activeProducts[projection] = [];++ newMap.events.register("addlayer", self, refreshZOrder);+ newMap.events.register("removelayer", self, refreshZOrder);+ newMap.events.register("moveend", self, fireEvent);+ newMap.events.register("zoomend", self, onZoomEnd);+ });+ productConfigs = mapConfig.products;++ self.setProjection(mapConfig.defaultProjection || "geographic");+ };++ /**+ * Method: setProjection+ * Changes the projection of the map.+ *+ * Parameters:+ * projection - The name of the projection to use (e.g., "geographic",+ * "arctic", "antarctic").+ *+ * Throws:+ * An exception if the specified projection is not supported.+ */+ self.setProjection = function(projection) {+ if ( !(projection in activeMaps) ) {+ throw "Unsupported projection: " + projection;+ }+ log.debug("Switch projection: " + projection);++ // Hide all map elements and then display only the ones for this+ // projection+ $(".map-projection").css("display", "none");+ $(".map-" + projection).css("display", "block");++ // Update convenience variables+ self.map = activeMaps[projection];+ self.products = activeProducts[projection];+ self.projection = projection;++ // Ensure the current layers are using the current day if this was+ // changed in the last projection+ self.setDay(currentDay);+ };++ /**+ * Method: setDay+ * Display product data for the specified ay.+ *+ * Parameters:+ * day - Day to display as a Date object. If this is undefined or null,+ * this method does nothing.+ */+ self.setDay = function(day) {+ if ( day ) {+ currentDay = day;+ $.each(self.map.products, function(name, product) {+ product.setDay(day);+ });+ refreshZOrder();+ }+ };++ /**+ * Method: set+ * Set the products that should be displayed on the map.+ *+ * Parameters:+ * requestedProducts - Array of product names to show on the map. If a+ * product is currently displayed, but is not in the array, it will be+ * removed from the map. If a product is not currently displayed, but it+ * is in the array, it will be added to the map.+ *+ * Throws:+ * An exception if the product for the given name is not defined.+ */+ self.set = function(requestedProducts) {+ var newProducts = [];++ $.each(requestedProducts, function(index, product) {+ if ( $.inArray(product, self.products) < 0 ) {+ if ( add(product) ) {+ newProducts.push(product);+ }+ } else {+ newProducts.push(product);+ }+ });+ $.each(self.products, function(index, product) {+ if ( $.inArray(product, requestedProducts) < 0 ) {+ remove(product);+ }+ });+ activeProducts[self.projection] = newProducts;+ self.products = activeProducts[self.projection];+ refreshZOrder();+ };++ /**+ * Method: append+ * Appends a layer to the map which is displayed on top.+ *+ * Parameters:+ * product - Name of the product to append to the map. If the product+ * already exsits, this method does nothing.+ */+ self.append = function(product) {+ if ( $.inArray(product, self.products) >= 0 ) {+ log.warn("Product already exists: " + product);+ return;+ }+ var newProducts = $.extend([], self.products);+ newProducts.push(product);+ self.set(newProducts);+ refreshZOrder();+ };++ //-------------------------------------------------------------------------+ // Private+ //-------------------------------------------------------------------------++ var fireEvent = function() {+ REGISTRY.fire(component);+ };++ /*+ * Adds a product of the given name to map. Returns true if the product+ * was added or already exists, false if the product is not supported+ * by the projection.+ */+ var add = function(name) {+ if ( name === "NON_EXISTENT_LAYER" ) {+ return;+ }++ var productConfig = productConfigs[name];+ if ( !productConfig ) {+ throw "No such product: " + name;+ }+ if ( $.inArray(name, self.products) >= 0 ) {+ log.warn("Product already added: " + name);+ return true;+ }++ var supported = false;+ if ( self.projection in productConfig.projections ) {+ log.debug("Adding product: " + name);+ var product = createProduct(self.map, self.projection,+ productConfigs[name]);+ product.setDay(currentDay);+ self.map.products[name] = product;+ supported = true;+ } else {+ log.warn(name + " does not support " + self.projection);+ supported = false;+ }+ return supported;+ };++ /*+ * Removes the given product from the map.+ */+ var remove = function(name) {+ if ( $.inArray(name, self.products) < 0 ) {+ log.warn("Product has not been added: " + name);+ return;+ }+ var product = self.map.products[name];+ if ( product ) {+ log.debug("Removing product: " + name);+ product.dispose();+ delete self.map.products[name];+ } else {+ log.warn("Product does not exist: " + name);+ }+ };++ /*+ * The order of the layers in the OpenLayers.Map object is not used+ * to determine the z-index but is done manually instead since this+ * is much easier. Change the z-index for for each product based on+ * its positition in the products array.+ */+ var refreshZOrder = function() {+ $.each(self.products, function(index, name) {+ var product = self.map.products[name];+ if ( product ) {+ product.setZIndex(index * 2);+ }+ });+ $.each(self.products, function(index, name) {+ var product = self.map.products[name];+ if ( product && product.bringToFront === true ) {+ product.setZIndex(index * 2 + self.products.length * 2);+ }+ });+ };++ /*+ * Creates the OpenLayers.Map object and all associated controls.+ */+ var createMap = function($div, id, projection, spec) {++ var config = $.extend(true, {}, spec);+ var controls = [];++ $("<div></div>")+ .appendTo($div)+ .attr("id", id)+ .addClass("map-projection")+ .addClass(id);++ var mapClass = "map-projection " + id + " ";++ // Create zoom in/out controls+ var zoomInControl = new OpenLayers.Control.ZoomIn();+ zoomInControl.title = "zoom in";+ zoomInControl.displayClass = mapClass + "olControlZoomInCustom";++ var zoomOutControl = new OpenLayers.Control.ZoomOut();+ zoomOutControl.title = "zoom out";+ zoomOutControl.displayClass = mapClass + "olControlZoomOutCustom";++ // Create panel to hold zoom controls and add to map+ var zoomPanel = new OpenLayers.Control.Panel();+ zoomPanel.displayClass = mapClass + "olControlZoomPanelCustom";+ zoomPanel.addControls(zoomInControl);+ zoomPanel.addControls(zoomOutControl);+ controls.push(zoomPanel);++ // Add navigation controls+ controls.push(new OpenLayers.Control.Navigation({+ dragPanOptions: {+ enableKinetic: true+ }+ }));++ // While these aren't controls, per se, they are extra decorations+ controls.push(new OpenLayers.Control.Attribution());+ controls.push(new OpenLayers.Control.ScaleLine({+ displayClass: mapClass + "olControlScaleLineCustom"+ }));++ var coordinateControl =+ Worldview.OpenLayers.COORDINATE_CONTROLS[projection];+ if ( coordinateControl ) {+ controls.push(coordinateControl);+ } else {+ log.warn("No coordinate control for projection " + projection);+ }++ config.controls = controls;+ var m = new OpenLayers.Map(id, config);++ var navControl =+ m.getControlsByClass("OpenLayers.Control.Navigation")[0];+ navControl.handlers.wheel.interval = 100;+ navControl.handlers.wheel.cumulative = false;++ return m;+ }++ /*+ * Validates the configuraiton for the OpenLayers.Map object, provides+ * any missing defaults, and does any object conversions as needed.+ */+ var validateMapConfig = function(config) {+ var config = $.extend(true, config, {});+ config.maxExtent = new OpenLayers.Bounds(config.maxExtent);+ config.allOverlays = true;+ config.fractionalZoom = false;+ return config;+ };++ /*+ * Merges in any projection specific properties.+ */+ var createProduct = function(map, proj, config) {+ config = $.extend(true, {}, config);++ if ( config.properties === undefined ) {+ config.properties = {};+ }++ // Merge in any projection specific properties+ config.properties = $.extend(true, config.properties,+ config.projections[proj]);+ delete config.projections;++ config.properties.projection = mapConfig.projections[proj].projection;+ if ( config.parameters ) {+ config.parameters.projection =+ mapConfig.projections[proj].projection;+ }++ if ( config.product === "daily" ) {+ return Worldview.OpenLayers.DailyProduct(map, config);+ } else if ( config.product === "static" ) {+ return Worldview.OpenLayers.StaticProduct(map, config);+ }+ throw "Unsupported product type: " + config.product;+ };++ var onZoomEnd = function(evt) {+ // "Disable" zoom in icon if zoomed to highest level+ // TODO: fix "color" updates since they don't currently have an effect+ if ( self.map.zoom === self.map.numZoomLevels - 1 ) {+ $('.olControlZoomInCustomItemInactive', '.map-' + self.projection)+ .css("background-color", "rgba(38,38,38,0.3)");+ $('.olControlZoomInCustomItemInactive', '.map-' + self.projection)+ .css("color", "#555555");+ }+ else {+ $('.olControlZoomInCustomItemInactive', '.map-' + self.projection)+ .css("background-color", "rgba(45,50,55,0.70)");+ $('.olControlZoomInCustomItemInactive', '.map-' + self.projection)+ .css("color", "#FFFFFF");+ }++ // "Disable" zoom out icon if zoomed to lowest level+ if ( self.map.zoom === 0 ) {+ $('.olControlZoomOutCustomItemInactive', '.map-' + self.projection)+ .css("background-color", "rgba(38,38,38,0.3)");+ $('.olControlZoomOutCustomItemInactive', '.map-' + self.projection)+ .css("color", "#555555");+ }+ else {+ $('.olControlZoomOutCustomItemInactive', '.map-' + self.projection)+ .css("background-color", "rgba(45,50,55,0.70)");+ $('.olControlZoomOutCustomItemInactive', '.map-' + self.projection)+ .css("color", "#FFFFFF");+ }+ };++ init();+ return self;+}diff --git a/js/Worldview/OpenLayers/StaticProduct.js b/js/Worldview/OpenLayers/StaticProduct.jsnew file mode 100644index 000000000..e0322707c--- /dev/null+++ b/js/Worldview/OpenLayers/StaticProduct.js@@ -0,0 +1,88 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++Worldview.namespace("OpenLayers");++/**+ * Class: Worldview.OpenLayers.StaticProduct+ * Product that is not based on the current date or time.+ *+ * Constructor: StaticProduct+ * Creates a new instance.+ *+ * Parameters:+ * map - The map object that layers will be added and removed from.+ * config - Options passed to the OpenLayers.Layer constructor to create+ * each layer. This object must also have one other property:+ * layerClass which defines the type of layer to create (e.g.,+ * OpenLayers.Layer.WMTS)+ */+Worldview.OpenLayers.StaticProduct = function(map, config) {++ var self = Worldview.OpenLayers.Product(config);++ // There is only one layer and this is it+ var layer = null;++ // Tue current z-index for the layer+ var zIndex = 0;++ //-------------------------------------------------------------------------+ // Public+ //-------------------------------------------------------------------------+ var init = function() {+ layer = self.createLayer();+ map.addLayer(layer);+ layer.setZIndex(zIndex);++ map.events.register("movestart", self, refreshZOrder);+ map.events.register("zoomend", self, refreshZOrder);+ };++ /**+ * Method: setDay+ * Does nothing.+ */+ self.setDay = function(d) {+ };++ /**+ * Method: setZIndex+ * Sets the z-index for the product's layer.+ *+ * Parameters:+ * index - The z-index to set.+ */+ self.setZIndex = function(index) {+ zIndex = index;+ refreshZOrder();+ };++ /**+ * Method: dispose+ * Removes the layer from the map.+ */+ self.dispose = function() {+ map.removeLayer(layer);+ map.events.unregister("movestart", self, refreshZOrder);+ map.events.unregister("zoomend", self, refreshZOrder);+ };++ //-------------------------------------------------------------------------+ // Private+ //-------------------------------------------------------------------------+ var refreshZOrder = function() {+ layer.setZIndex(zIndex);+ };++ init();+ return self;+}\ No newline at end of filediff --git a/js/Worldview/Widget/Map.js b/js/Worldview/Widget/Map.jsnew file mode 100644index 000000000..cbf8220f1--- /dev/null+++ b/js/Worldview/Widget/Map.js@@ -0,0 +1,116 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++Worldview.namespace("Widget");++Worldview.Widget.Map = function(containerId, spec) {++ var self = {};+ var log = Logging.Logger("Worldview.Map");++ self.productMap = null;+ self.config = null;++ var init = function() {+ if ( REGISTRY ) {+ REGISTRY.register(containerId, self);+ } else {+ throw "Cannot register Map, REGISTRY not found";+ }++ $.getJSON(spec.dataSourceUrl, onConfigLoad)+ .error(Worldview.ajaxError(onConfigLoadError));+ };++ self.setValue = function(extent) {+ log.debug("setValue: " + extent);+ var bounds = OpenLayers.Bounds.fromString(extent);+ self.productMap.map.zoomToExtent(bounds, true);+ };++ self.getValue = function() {+ var queryString = containerId + "=" ++ self.productMap.map.getExtent().toBBOX();+ log.debug("getValue: " + queryString);+ return queryString;+ };++ self.loadFromQuery = function(queryString) {+ log.debug("loadFromQuery: " + queryString);++ var query = Worldview.queryStringToObject(queryString);++ var projection = query["switch"] || "geographic";+ self.productMap.setProjection(projection)++ var extent = query[containerId];+ if ( extent ) {+ self.setValue(extent);+ }+ };++ self.validate = function() {+ return true;+ };++ self.setDataSourceUrl = function(url) {+ throw "setDataSourceUrl: unsupported";+ };++ self.getDataSourceUrl = function() {+ return spec.dataSourceUrl;+ };++ self.setStatus = function(status) {+ throw "setStatus: unsupported";+ };++ self.getStatus = function() {+ throw "getStatus: unsupported";+ };++ self.isReady = function() {+ return self.productMap != null;+ }++ var onConfigLoad = function(result) {+ try {+ self.config = result;+ self.productMap = Worldview.OpenLayers.ProductMap(containerId,+ self.config, self);++ $.each(self.config.products, function(name, config) {+ if ( config.defaultLayer === "true" ) {+ self.productMap.append(name);+ }+ });++ self.productMap.map.zoomToMaxExtent();++ if ( spec.onReady ) {+ spec.onReady();+ }++ REGISTRY.markComponentReady(containerId);+ log.debug("Map is ready");+ } catch ( cause ) {+ Worldview.error("Unable to configure map", cause);+ }+ };++ var onConfigLoadError = function(message) {+ Worldview.error("Unable to load map configuration from server",+ message);+ };++ init();+ return self;+}diff --git a/js/Worldview/Widget/WorldviewMap.js b/js/Worldview/Widget/WorldviewMap.jsnew file mode 100644index 000000000..7a7a6609f--- /dev/null+++ b/js/Worldview/Widget/WorldviewMap.js@@ -0,0 +1,114 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++Worldview.namespace("Widget");++Worldview.Widget.WorldviewMap = function(containerId, spec) {++ var ns = Worldview.Widget;++ var onReady = function() {+ setExtentToLeading();+ };+ spec.onReady = onReady;++ var self = ns.Map(containerId, spec);++ var log = Logging.Logger("Worldview.Map");+ var lastState = {};+ var last = null;++ self.updateComponent = function(queryString) {+ try {+ if ( !self.isReady() ) {+ return;+ }+ if ( !(self.productMap.projection in lastState) ) {+ lastState[self.productMap.projection] = {};+ }+ last = lastState[self.productMap.projection];++ if ( last.queryString === queryString ) {+ return;+ }+ var state = Worldview.queryStringToObject(queryString);+ state.productsString = state.products;+ state.products = splitProducts(state);++ log.debug(state);++ if ( state["switch"] !== last["switch"] ) {+ self.productMap.setProjection(state["switch"]);+ self.productMap.set(state.products);+ } else if ( state.productsString !== last.productsString ) {+ self.productMap.set(state.products);+ }+ if ( state.time !== last.time ) {+ self.productMap.setDay(new Date(state.time));+ }++ last = state;+ last.queryString = queryString;+ lastState[self.productMap.projection] = last;+ } catch ( cause ) {+ Worldview.error("Unable to update map", cause);+ }+ };++ var setExtentToLeading = function() {+ if ( self.productMap.projection !== "geographic" ) {+ return;+ }++ // 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);+ self.productMap.map.zoomToExtent([+ minLon, -46.546875, maxLon, 53.015625], true);++ //this.fire();+ };++ var splitProducts = function(state) {+ var results = [];+ var sets = state.products.split("~");+ for ( var i = 0; i < sets.length; i++ ) {+ var set = sets[i];+ var items = set.split(".");+ // First item is the type (e.g., baselayer or overlay). Ignore it.+ for ( var j = 1; j < items.length; j++ ) {+ results.push(items[j]);+ }+ }+ return results;+ }++ return self;+}+\ No newline at end of filediff --git a/js/imageDownload.js b/js/imageDownload.jsindex e0005ac81..476a1f01a 100644--- a/js/imageDownload.js+++ b/js/imageDownload.js@@ -130,79 +130,82 @@ SOTE.widget.ImageDownload.prototype.getValue = function(){SOTE.widget.ImageDownload.prototype.updateComponent = function(qs){- var bbox = SOTE.util.extractFromQuery('map',qs);- var time = SOTE.util.extractFromQuery('time',qs);- var pixels = SOTE.util.extractFromQuery('camera', qs);- var s = SOTE.util.extractFromQuery('switch',qs);- var products = SOTE.util.extractFromQuery('products',qs);-- var px = pixels.split(",");- var x1 = px[0]; var y1= px[1]; var x2 = px[2]; var y2=px[3];-- var lonlat1 = this.m.map.getLonLatFromViewPortPx(new OpenLayers.Pixel(x1, y2));- var lonlat2 = this.m.map.getLonLatFromViewPortPx(new OpenLayers.Pixel(x2, y1));-- var dlURL = "http://map2.vis.earthdata.nasa.gov/imagegen/?";--- //var dTime = new Date((time.split(/T/))[0]+"T00:00:00");- var dTime = SOTE.util.UTCDateFromISO8601String(time);- dTime.setHours(0);- dTime.setMinutes(0);- dTime.setSeconds(0);-- //Julian date, padded with two zeros (to ensure the julian date is always in DDD format).- var jDate = "00" + (1+Math.ceil((dTime - new Date(dTime.getFullYear(),0,1)) / 86400000));- dlURL += "TIME="+dTime.getFullYear()+(jDate).substr((jDate.length)-3);--- dlURL += "&extent="+lonlat1.lon+","+lonlat1.lat+","+lonlat2.lon+","+lonlat2.lat;-- dlURL +="&layers=";- //Reverse the order of overlays to get the correct layer ordering.- if (products != ""){- var a = products.split("~");- var base = a[0].split(".");-- var overlays = a[1].split(".");- overlays.reverse(); overlays.pop();- for(var i=1; i<base.length; ++i){- dlURL += base[i]+",";- }- for(var i=0; i<overlays.length; i++){- dlURL+= overlays[i]+",";- }-- //remove the extra ","- dlURL = dlURL.slice(0,-1);-- }--- var imgWidth=0; var imgHeight=0;-- $("select#selImgResolution").change(function () {- imgRes = $("#selImgResolution option:selected").val();- imgWidth = Math.round((Math.abs(lonlat2.lon - lonlat1.lon) / 0.002197) / Number(imgRes));- imgHeight = Math.round((Math.abs(lonlat2.lat - lonlat1.lat) / 0.002197) / Number(imgRes));- imgFilesize = ((imgWidth * imgHeight * 24) / 8388608).toFixed(2);-- $("#imgWidth").text((imgWidth));- $("#imgHeight").text((imgHeight));- $("#imgFileSize").text(imgFilesize);- if(imgFilesize>250) { $("#imgFileSize").css("color", "#D99694"); $("#btnImgDownload").attr("disabled", "disabled"); }- else { $("#imgFileSize").css("color", "white"); $("#btnImgDownload").removeAttr("disabled"); }- })- .change();--- $("#btnImgDownload").unbind('click').click(function(){- window.open(dlURL+"&format="+$("#selImgFormat option:selected").val()+"&width="+$("#imgWidth").text()+"&height="+$("#imgHeight").text(),"_blank");- //console.log(dlURL+"&format="+$("#selImgFormat option:selected").val()+"&size="+$("#imgWidth").text()+"+"+$("#imgHeight").text());- });+ try {+ var bbox = SOTE.util.extractFromQuery('map',qs);+ var time = SOTE.util.extractFromQuery('time',qs);+ var pixels = SOTE.util.extractFromQuery('camera', qs);+ var s = SOTE.util.extractFromQuery('switch',qs);+ var products = SOTE.util.extractFromQuery('products',qs);++ var px = pixels.split(",");+ var x1 = px[0]; var y1= px[1]; var x2 = px[2]; var y2=px[3];++ var lonlat1 = this.m.productMap.map.getLonLatFromViewPortPx(new OpenLayers.Pixel(x1, y2));+ var lonlat2 = this.m.productMap.map.getLonLatFromViewPortPx(new OpenLayers.Pixel(x2, y1));- this.setValue(dlURL);-+ var dlURL = "http://map2.vis.earthdata.nasa.gov/imagegen/?";+++ //var dTime = new Date((time.split(/T/))[0]+"T00:00:00");+ var dTime = SOTE.util.UTCDateFromISO8601String(time);+ dTime.setHours(0);+ dTime.setMinutes(0);+ dTime.setSeconds(0);++ //Julian date, padded with two zeros (to ensure the julian date is always in DDD format).+ var jDate = "00" + (1+Math.ceil((dTime - new Date(dTime.getFullYear(),0,1)) / 86400000));+ dlURL += "TIME="+dTime.getFullYear()+(jDate).substr((jDate.length)-3);+++ dlURL += "&extent="+lonlat1.lon+","+lonlat1.lat+","+lonlat2.lon+","+lonlat2.lat;++ dlURL +="&layers=";+ //Reverse the order of overlays to get the correct layer ordering.+ if (products != ""){+ var a = products.split("~");+ var base = a[0].split(".");++ var overlays = a[1].split(".");+ overlays.reverse(); overlays.pop();+ for(var i=1; i<base.length; ++i){+ dlURL += base[i]+",";+ }+ for(var i=0; i<overlays.length; i++){+ dlURL+= overlays[i]+",";+ }++ //remove the extra ","+ dlURL = dlURL.slice(0,-1);++ }+++ var imgWidth=0; var imgHeight=0;++ $("select#selImgResolution").change(function () {+ imgRes = $("#selImgResolution option:selected").val();+ imgWidth = Math.round((Math.abs(lonlat2.lon - lonlat1.lon) / 0.002197) / Number(imgRes));+ imgHeight = Math.round((Math.abs(lonlat2.lat - lonlat1.lat) / 0.002197) / Number(imgRes));+ imgFilesize = ((imgWidth * imgHeight * 24) / 8388608).toFixed(2);++ $("#imgWidth").text((imgWidth));+ $("#imgHeight").text((imgHeight));+ $("#imgFileSize").text(imgFilesize);+ if(imgFilesize>250) { $("#imgFileSize").css("color", "#D99694"); $("#btnImgDownload").attr("disabled", "disabled"); }+ else { $("#imgFileSize").css("color", "white"); $("#btnImgDownload").removeAttr("disabled"); }+ })+ .change();+++ $("#btnImgDownload").unbind('click').click(function(){+ window.open(dlURL+"&format="+$("#selImgFormat option:selected").val()+"&width="+$("#imgWidth").text()+"&height="+$("#imgHeight").text(),"_blank");+ //console.log(dlURL+"&format="+$("#selImgFormat option:selected").val()+"&size="+$("#imgWidth").text()+"+"+$("#imgHeight").text());+ });++ this.setValue(dlURL);+ } catch ( cause ) {+ Worldview.error("Unable to update download box", cause);+ }};diff --git a/js/main.js b/js/main.jsindex 245cdd28f..8b88b948d 100644--- a/js/main.js+++ b/js/main.js@@ -1,6 +1,10 @@window.onload = function(){// Initialize "static" vars+ Logging.debug("Worldview.Map");+var entryPoint = function() {+ var log = Logging.Logger();+this.selector = new YAHOO.widget.Panel("selector", { zIndex:1019, visible:false } );this.selector.setBody("<div id='selectorbox'></div>");this.selector.render(document.body);@@ -9,7 +13,7 @@ window.onload = function(){// Initialize "static" varsthis.selector.beforeShowEvent.subscribe(function(e){$("#"+sel_id).css("display","block");})// Create map- var m = new SOTE.widget.MapSote("map",{baseLayer:"MODIS_Terra_CorrectedReflectance_TrueColor"});+ var m = Worldview.Widget.WorldviewMap("map", {dataSourceUrl: "data/map"});var ss = new SOTE.widget.Switch("switch",{dataSourceUrl:"a",selected:"geographic"});var a = new SOTE.widget.Bank("products",{dataSourceUrl:"ap_products.php",title:"My Layers",selected:{antarctic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.antarctic_coastlines", arctic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.arctic_coastlines",geographic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.sedac_bound"},categories:["Base Layers","Overlays"],callback:this.showSelector,selector:this.selector});var s = new SOTE.widget.Selector("selectorbox",{dataSourceUrl:"ap_products.php",categories:["Base Layers","Overlays"]});@@ -19,7 +23,27 @@ window.onload = function(){// Initialize "static" vars//Image download variablesrb = new SOTE.widget.RubberBand("camera",{icon:"images/camera.png",onicon:"images/cameraon.png",cropee:"map"});var id = new SOTE.widget.ImageDownload("imagedownload",{baseLayer:"MODIS_Terra_CorrectedReflectance_TrueColor",alignTo: rb, m:m});++ // Get rid of address bar on iphone/ipod+ var fixSize = function() {+ window.scrollTo(0,0);+ document.body.style.height = '100%';+ if (!(/(iphone|ipod)/.test(navigator.userAgent.toLowerCase()))) {+ if (document.body.parentNode) {+ document.body.parentNode.style.height = '100%';+ }+ }+ };+ setTimeout(fixSize, 700);+ setTimeout(fixSize, 1500);++ log.info(Worldview.NAME + ", Version " + Worldview.VERSION);};- entryPoint();+ try {+ entryPoint();+ } catch ( cause ) {+ Worldview.error("Failed to start Worldview", cause);+ }+};diff --git a/js/map.js b/js/map.jsindex ec8fe3bd4..d28def774 100644--- a/js/map.js+++ b/js/map.js@@ -395,10 +395,9 @@ SOTE.widget.Map.prototype.init = function(){// Add navigation controls//this.map.addControl(new OpenLayers.Control.KeyboardDefaults());this.map.addControl(new OpenLayers.Control.Navigation({- dragPanOptions: {- enableKinetic: true- }-+ dragPanOptions: {+ enableKinetic: true+ }}));//this.map.addControl(new OpenLayers.Control.LayerSwitcher({displayClass: 'olControlLayerSwitcher', 'ascending':false}));//this.map.addControl(new OpenLayers.Control.OverviewMap());diff --git a/test/Worldview/OpenLayers/testDailyProduct.js b/test/Worldview/OpenLayers/testDailyProduct.jsnew file mode 100644index 000000000..4d141a267--- /dev/null+++ b/test/Worldview/OpenLayers/testDailyProduct.js@@ -0,0 +1,102 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++TestCase("OpenLayers.DailyProduct", TestSuite.TestCases({++ ns: null,+ mockMap: null,+ mockLayers: null,+ product: null,++ setUp: function() {+ ns = Worldview.OpenLayers;+ mockMap = mock({+ addLayer: function() {},+ events: {},+ getLayerIndex: function() {},+ removeLayer: function() {}+ });++ mockMap.events.register = function(event, object, callback) {+ if ( event === "movestart" ) {+ mockMap.moveStart = callback;+ } else if ( event === "zoomend" ) {+ mockMap.zoomEnd = callback;+ }+ };++ mockConfig = {+ layerClass: "__TEST_LAYER_CLASS"+ };+ mockLayers = [];+ window.__TEST_LAYER_CLASS = function() {+ var self = {};+ self.mergeNewParams = function() {};+ self.opacity = 0;+ self.zindex = 0;+ self.visibility = false;+ self.setOpacity = function(v) { self.opacity = v; };+ self.setZIndex = function(v) { self.zindex = v; };+ self.setVisibility = function(v) { self.visibility = v; };+ self.getVisibility = function() { return self.visibility; };+ mockLayers.push(self);+ return self;+ };+ product = ns.DailyProduct(mockMap, mockConfig);+ },++ tearDown: function() {+ delete window.__TEST_LAYER_CLASS;+ },++ // Check that an exception is thrown if the layerClass does not exist+ testInvalidLayerClass: function() {+ try {+ ns.DailyProduct(mockMap, { layerClass: "foo" });+ fail("foo should not be a valid layerClass");+ } catch ( message ) {+ assertEquals("No such layerClass: foo; In foo, foo is undefined",+ message);+ }+ },++ // Check that when the day is set, another layer is created and the+ // opacity for the original layer is set to zero. Also check that the+ // visible layer is on top+ testChangeDay: function() {+ product.setDay(new Date(2013, 02, 15));+ assertEquals(2, mockLayers.length);+ assertEquals(0, mockLayers[0].opacity);+ assertEquals(0, mockLayers[0].zindex);+ assertEquals(1, mockLayers[1].opacity);+ assertEquals(1, mockLayers[1].zindex);+ },++ // Check that when the map is moved, layers are invalidated properly+ testMoveMap: function() {+ product.setDay(new Date(2013, 02, 15));+ mockMap.moveStart();+ assertEquals(2, mockLayers.length);+ assertFalse(mockLayers[0].visibility);+ assertTrue(mockLayers[1].visibility);+ },++ // Check that when the map requires a redraw, layers are removed+ testRedrawMap: function() {+ when(mockMap).getLayerIndex(anything()).thenReturn(1);+ product.setDay(new Date(2013, 02, 15));+ mockMap.moveStart();+ mockMap.zoomEnd();+ verify(mockMap, times(2)).addLayer(anything());+ verify(mockMap).removeLayer(anything());+ }++}));diff --git a/test/Worldview/OpenLayers/testProductMap.js b/test/Worldview/OpenLayers/testProductMap.jsnew file mode 100644index 000000000..9c54ee8c4--- /dev/null+++ b/test/Worldview/OpenLayers/testProductMap.js@@ -0,0 +1,197 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++TestCase("OpenLayers.ProductMap", TestSuite.TestCases({++ ns: null,+ patcher: null,+ mapConfig: null,++ setUp: function() {+ ns = Worldview.OpenLayers;+ patcher = TestSuite.Patcher();++ mapConfig = {+ projections: {+ geographic: {},+ arctic: {},+ antarctic: {}+ },+ products: {+ alpha: {+ productClass: "__TEST_PRODUCT_CLASS",+ layerClass: "__TEST_LAYER_CLASS",+ projections: {+ geographic: {},+ arctic: {},+ antarctic: {}+ }+ },+ beta: {+ productClass: "__TEST_PRODUCT_CLASS",+ layerClass: "__TEST_LAYER_CLASS",+ projections: {+ geographic: {},+ arctic: {},+ antarctic: {}+ }+ },+ gamma: {+ productClass: "__TEST_PRODUCT_CLASS",+ layerClass: "__TEST_LAYER_CLASS",+ projections: {+ arctic: {}+ }+ },+ delta: {+ productClass: "__TEST_PRODUCT_CLASS",+ layerClass: "__TEST_LAYER_CLASS",+ projections: {+ antarctic: {}+ }+ }+ }+ };++ window.__TEST_PRODUCT_CLASS = function() {+ return {+ setDay: mockFunction(),+ setZIndex: mockFunction(),+ dispose: mockFunction()+ };+ };+ window.__TEST_LAYER_CLASS = function() {};++ $("<div id='__TEST_PRODUCT_MAP'></div>").appendTo("body");+ },++ tearDown: function() {+ patcher.undo();+ delete window.__TEST_PRODUCT_CLASS;+ delete window.__TEST_LAYER_CLASS;+ },++ // Check that an error is thrown if the map container is not defined+ testNoContainer: function() {+ try {+ ns.ProductMap("__NO_MAP", mapConfig);+ fail("__NO_MAP should not be a valid container");+ } catch ( message ) {+ assertEquals("No container for ProductMap: __NO_MAP", message);+ }+ },++ // Check that all controls are created, once for each projection (3)+ testControls: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ assertEquals(3, $(".olControlZoomInCustom").length);+ assertEquals(3, $(".olControlZoomOutCustom").length);+ assertEquals(3, $(".olControlZoomPanelCustom").length);+ assertEquals(3, $(".olControlScaleLineCustom").length);+ },++ // Check that a default projection is selected+ testDefaultProjection: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ assertEquals("geographic", productMap.projection);+ },++ // Check that if a starting projection is defined, it is used+ testStartingProjection: function() {+ mapConfig.defaultProjection = "arctic";+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ assertEquals("arctic", productMap.projection);+ },+++ // Check that an error is thrown if the starting projection is invalid+ testInvalidStartingProjection: function() {+ mapConfig.defaultProjection = "foo";+ try {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ fail("foo should not be a valid projection");+ } catch ( message ) {+ assertEquals("Unsupported projection: foo", message);+ }+ },++ // Check that the correct divs are visible on a projection switch+ testVisibleDivsProjectionSwitch: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ productMap.setProjection("arctic");+ assertTrue($(".map-arctic :visible").length > 0);+ assertTrue($(".map-geographic :visible").length === 0);+ },++ // Check that a product is appended properly+ testAppend: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ productMap.append("alpha");+ assertTrue($.inArray("alpha", productMap.products) >= 0);+ },++ // Check that an error is thrown on an undefined product+ testAppendNoProduct: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ try {+ productMap.append("omega");+ fail("Product should not exist");+ } catch ( message ) {+ assertEquals("No such product: omega", message);+ }+ },++ // Check that only one layer exists after a duplicate add+ testAppendDuplicate: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ productMap.append("alpha");+ productMap.append("alpha");+ assertEquals(1, productMap.products.length);+ },++ // Check that product is not added if it is not supported by projection+ testAppendProjectionNotSupported: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ productMap.append("gamma");+ assertEquals(0, productMap.products.length);+ },++ // Check that the set function adds all new layers+ testSet: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ productMap.set(["alpha", "beta"]);+ assertEquals(2, productMap.products.length);+ assertEquals("alpha", productMap.products[0]);+ assertEquals("beta", productMap.products[1]);+ },++ // Check that set reorders layers+ testSetReorder: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ productMap.set(["alpha", "beta"]);+ productMap.set(["beta", "alpha"]);+ assertEquals(2, productMap.products.length);+ assertEquals("beta", productMap.products[0]);+ assertEquals("alpha", productMap.products[1]);+ },++ // Check that set removes layers+ testSetRemove: function() {+ productMap = ns.ProductMap("__TEST_PRODUCT_MAP", mapConfig);+ productMap.set(["alpha", "beta"]);+ productMap.set(["beta"]);+ assertEquals(1, productMap.products.length);+ assertEquals("beta", productMap.products[0]);+ }++}));++diff --git a/test/Worldview/TestSuite/testPatcher.js b/test/Worldview/TestSuite/testPatcher.jsindex 86e2f3983..aa70302d7 100644--- a/test/Worldview/TestSuite/testPatcher.js+++ b/test/Worldview/TestSuite/testPatcher.js@@ -11,31 +11,52 @@TestCase("TestSuite.Patcher", {+ patcher: null,+setUp: function() {- Worldview.foo = "FOO";+ patcher = TestSuite.Patcher();+ window.__TEST_PATCHER = {}+ window.__TEST_PATCHER.foo = "FOO";},tearDown: function() {- delete Worldview.foo;+ patcher.undo();+ delete window.__TEST_PATCHER;},// Check to see if a patch and undo are successfultestPatch: function() {- var patcher = TestSuite.Patcher();- patcher.apply("Worldview.foo", "BAR");- assertEquals("BAR", Worldview.foo);+ patcher.apply("__TEST_PATCHER.foo", "BAR");+ assertEquals("BAR", __TEST_PATCHER.foo);patcher.undo();- assertEquals("FOO", Worldview.foo);+ assertEquals("FOO", __TEST_PATCHER.foo);},// Make sure when double patched, it returns to the original valuetestPatchMultiple: function() {- var patcher = TestSuite.Patcher();- patcher.apply("Worldview.foo", "one");- patcher.apply("Worldview.foo", "two");- assertEquals("two", Worldview.foo);+ patcher.apply("__TEST_PATCHER.foo", "one");+ patcher.apply("__TEST_PATCHER.foo", "two");+ assertEquals("two", __TEST_PATCHER.foo);patcher.undo();- assertEquals("FOO", Worldview.foo);+ assertEquals("FOO", __TEST_PATCHER.foo);+ },++ // Check patching an undefined value+ testPatchUndefined: function() {+ patcher.apply("__TEST_PATCHER.foo", undefined);+ assertUndefined(__TEST_PATCHER.foo);+ },++ // Check there is a good error message when a parent in the object+ // path is undefined+ testInvalidParent: function() {+ try {+ patcher.apply("__TEST_PATCHER.bar");+ fail();+ } catch ( message ) {+ assertEquals("In __TEST_PATCHER.bar, bar is undefined", message);+ }}+});diff --git a/test/Worldview/TestSuite/testTestCases.js b/test/Worldview/TestSuite/testTestCases.jsnew file mode 100644index 000000000..0123ee01c--- /dev/null+++ b/test/Worldview/TestSuite/testTestCases.js@@ -0,0 +1,73 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++TestCase("TestSuite.TestCases", {++ // Check that the setUp call is properly passed through+ testSetupCalled: function() {+ var called = false;+ var tc = TestSuite.TestCases({+ setUp: function() {+ called = true;+ }+ });+ tc.setUp();+ assertTrue(called);+ },++ // Check that the tearDown call is properly passed through+ testTearDownCalled: function() {+ var called = false;+ var tc = TestSuite.TestCases({+ tearDown: function() {+ called = true;+ }+ });+ tc.tearDown();+ assertTrue(called);+ },++ // Check that the test call is properly passed through+ testTestCalled: function() {+ var called = false;+ var tc = TestSuite.TestCases({+ testSomething: function() {+ called = true;+ }+ })+ tc.testSomething();+ assertTrue(called);+ },+++ // Check that if there is an error running the test, tearDown is still+ // called+ testTearDownCalledOnError: function() {+ var called = false;+ var tc = TestSuite.TestCases({+ tearDown: function() {+ called = true;+ },+ testSomething: function() {+ throw "Test Error";+ }+ });++ try {+ tc.testSomething();+ fail();+ } catch ( message ) {+ assertEquals("Test Error", message);+ assertTrue(called);+ }+ }++});diff --git a/test/ext/jsmockito-1.0.4.js b/test/ext/jsmockito-1.0.4.git.jssimilarity index 96%rename from test/ext/jsmockito-1.0.4.jsrename to test/ext/jsmockito-1.0.4.git.jsindex 3fe2a12f1..5db421809 100644--- a/test/ext/jsmockito-1.0.4.js+++ b/test/ext/jsmockito-1.0.4.git.js@@ -392,7 +392,7 @@ JsMockito = {*/spy: function(delegate) {return (typeof delegate == 'function')?- JsMockito.mockFunction(delegate) : JsMockito.mock(delegate);+ JsMockito.mockFunction(delegate) : JsMockito.mock(delegate, delegate);},contextCaptureFunction: function(defaultContext, handler) {@@ -521,6 +521,7 @@ JsMockito = {}};+if (typeof exports !== "undefined") exports.JsMockito = JsMockito;// vi:ts=2 sw=2 expandtab/*** Create a mockable and stubbable anonymous function.@@ -625,9 +626,10 @@ JsMockito._export.push('mockFunction');/*** Create a mockable and stubbable objects.*- * <p>A mock is created with the constructor for an object as an argument.- * Once created, the mock object will have all the same methods as the source- * object which, when invoked, will return undefined by default.</p>+ * <p>A mock is created with the constructor for an object, or a prototype+ * object, as an argument. Once created, the mock object will have all the+ * same methods as the source object which, when invoked, will return undefined+ * by default.</p>** <p>Stub declarations may then be made for these methods to have them return* useful values or perform actions when invoked.</p>@@ -648,25 +650,32 @@ JsMockito._export.push('mockFunction');* JsMockito.verify(mockObj).add(1, 4); // will throw an exception* </pre>*+ * Alternatively, using a prototype:+ *+ * <pre>+ * myPrototype = {+ * add: function(a, b) { return a + b }+ * };+ *+ * var mockObj = JsMockito.mock(myPrototype);+ * mockObj.add(5, 4); // result is undefined+ * </pre>+ ** @param Obj {function} the constructor for the object to be mocked* @return {object} a mock object*/-JsMockito.mock = function(Obj) {- var delegate = {};- if (typeof Obj != "function") {- delegate = Obj;- Obj = function() { };- Obj.prototype = delegate;- Obj.prototype.constructor = Obj;- }+JsMockito.mock = function(Obj, delegate) {+ delegate = delegate || {};+var MockObject = function() { };- MockObject.prototype = new Obj;+ MockObject.prototype = (typeof Obj == "function")? new Obj : Obj;MockObject.prototype.constructor = MockObject;var mockObject = new MockObject();var stubBuilders = {};var verifiers = {};-+ var mockFunctions = [];+var contextMatcher = JsHamcrest.Matchers.sameAs(mockObject);var addMockMethod = function(name) {@@ -677,9 +686,11 @@ JsMockito.mock = function(Obj) {return delegate[name].apply(context, arguments);};}- mockObject[name] = JsMockito.mockFunction('obj.' + name, delegateMethod);- stubBuilders[name] = mockObject[name]._jsMockitoStubBuilder;- verifiers[name] = mockObject[name]._jsMockitoVerifier;+ var mockFunc = JsMockito.mockFunction('obj.' + name, delegateMethod);+ mockObject[name] = mockFunc;+ stubBuilders[name] = mockFunc._jsMockitoStubBuilder;+ verifiers[name] = mockFunc._jsMockitoVerifier;+ mockFunctions.push(mockFunc);};for (var methodName in mockObject) {@@ -708,11 +719,7 @@ JsMockito.mock = function(Obj) {};mockObject._jsMockitoMockFunctions = function() {- return JsMockito.objectValues(- JsMockito.mapObject(mockObject, function(func) {- return JsMockito.isMock(func)? func : null;- })- );+ return mockFunctions;};return mockObject;@@ -976,6 +983,14 @@ JsMockito.Integration = {JsTestDriver: function() {JsMockito.Integration.importTo(window);},++ /**+ * Make the public JsMockito API available to Node.js / NodeUnit+ * @see JsMockito.Integration.importTo(global)+ */+ Nodeunit: function() {+ JsMockito.Integration.importTo(global);+ },/*** Make the public JsMockito API available to JsUnitTestdiff --git a/test/jsTestDriver.conf b/test/jsTestDriver.confindex 8fbf2dd42..56b8161cd 100644--- a/test/jsTestDriver.conf+++ b/test/jsTestDriver.conf@@ -3,7 +3,7 @@ server: http://localhost:8811load:- ../js/ext/jquery/jquery-1.6.4.js- ext/jshamcrest.js- - ext/jsmockito-1.0.4.js+ - ext/jsmockito-1.0.4.git.js- lib/*.js- lib/TestSuite/*.js- ../js/ext/yui/yahoo-min.js@@ -15,6 +15,13 @@ load:- ../js/ext/jcrop/jcrop.js- ../js/ext/jquery.dd/jquery.dd.js- ../js/OpenLayers/Tile/Canvas.js+ - ../js/Logging.js+ - ../js/Worldview.js+ - ../js/Worldview/Visual.js+ - ../js/Worldview/Visual/*.js+ - ../js/Worldview/Widget/*.js+ - ../js/Worldview/OpenLayers.js+ - ../js/Worldview/OpenLayers/*.js- ../js/component.js- ../js/registry.js- ../js/util.js@@ -29,11 +36,10 @@ load:- ../js/switch.js- ../js/selector.js- ../js/sote.js- - ../js/Worldview.js- - ../js/Worldview/Visual.js- - ../js/Worldview/Visual/*.jstest:+ - testLogging.js+ - testWorldview.js- OpenLayers/Tile/*.js- Worldview/*.js- Worldview/Visual/*.jsdiff --git a/test/test.html b/test/test.htmlnew file mode 100644index 000000000..51e9438fa--- /dev/null+++ b/test/test.html@@ -0,0 +1,15 @@+<!doctype html>+<html>+ <head>+ <title>Testing Window</title>+ <script type="text/javascript" src="../js/ext/jquery/jquery-1.6.4.js"></script>+ <script type="text/javascript" src="ext/jshamcrest.js"></script>+ <script type="text/javascript" src="ext/jsmockito-1.0.4.git.js"></script>+ <script type="text/javascript" src="lib/TestSuite.js"></script>+ <script type="text/javascript" src="lib/TestSuite/Patcher.js"></script>+ <script type="text/javascript" src="../js/Logging.js"></script>+ </head>+ <body>+ Testing window+ </body>+</html>\ No newline at end of filediff --git a/test/testLogging.js b/test/testLogging.jsnew file mode 100644index 000000000..399b1caae--- /dev/null+++ b/test/testLogging.js@@ -0,0 +1,179 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ */++TestCase("Logging.standard", TestSuite.TestCases({++ patcher: null,+ mockConsole: null,++ setUp: function() {+ patcher = TestSuite.Patcher();+ },++ tearDown: function() {+ patcher.undo();+ Logging.undebug("foo");+ Logging.undebug();+ },++ // Check that it passes through to the correct object+ testMessage: function() {+ var mockLog = mockFunction();+ patcher.apply("console.log", mockLog);+ Logging.Logger().message("log");+ verify(mockLog)("log");+ },++ // Check that it passes through to the correct object+ testError: function() {+ var mockError = mockFunction();+ patcher.apply("console.error", mockError);+ Logging.Logger().error("error");+ verify(mockError)("error");+ },++ // Check that it passes through to the correct object+ testInfo: function() {+ var mockInfo = mockFunction();+ patcher.apply("console.info", mockInfo);+ Logging.Logger().info("info");+ verify(mockInfo)("info");+ },++ // Check that it passes through to the correct object+ testWarn: function() {+ var mockWarn = mockFunction();+ patcher.apply("console.warn", mockWarn);+ Logging.Logger().warn("warn");+ verify(mockWarn)("warn");+ },++ // Check that it passes through to the correct object+ testTrace: function() {+ var mockTrace = mockFunction();+ patcher.apply("console.trace", mockTrace);+ Logging.Logger().trace();+ verify(mockTrace)();+ },++ // Check for no output when debugging is not enabled+ testDebugDisabled: function() {+ var mockLog = mockFunction();+ patcher.apply("console.log", mockLog);+ Logging.Logger("foo").debug("foo");+ verifyZeroInteractions(mockLog);+ },++ // Check for output when debugging is enabled+ testDebugEnabled: function() {+ var mockLog = mockFunction();+ patcher.apply("console.log", mockLog);+ Logging.debug("foo");+ Logging.Logger("foo").debug("foo");+ verify(mockLog)("foo");+ },++ // Check for no output for debug with no namespace+ testDebugDisabledNoNamespace: function() {+ var mockLog = mockFunction();+ patcher.apply("console.log", mockLog);+ Logging.Logger().debug("foo");+ verifyZeroInteractions(mockLog);+ },++ // Check for output when all debughing is enabled with no namespace+ testAllDebugEnabledNoNamespace: function() {+ var mockLog = mockFunction();+ patcher.apply("console.log", mockLog);+ Logging.debug();+ Logging.Logger().debug("foo");+ verify(mockLog)("foo");+ },++ // Check for output when all debugging is enabled with namespace+ testAllDebugEnabled: function() {+ var mockLog = mockFunction();+ patcher.apply("console.log", mockLog);+ Logging.debug();+ Logging.Logger("foo").debug("foo");+ verify(mockLog)("foo");+ }++}));++TestCase("Logging.noConsole", TestSuite.TestCases({++ patcher: null,++ setUp: function() {+ patcher = TestSuite.Patcher();+ patcher.apply("console", undefined);+ },++ tearDown: function() {+ patcher.undo();+ },++ // Test that no errors are thrown when console is undefined+ testAll: function() {+ Logging.Logger().error("foo");+ Logging.Logger().message("foo");+ Logging.Logger().info("foo");+ Logging.Logger().warn("foo");+ Logging.Logger().trace("foo");+ }++}));++TestCase("Logging.onlyLog", TestSuite.TestCases({++ patcher: null,+ mockLog: null,++ setUp: function() {+ patcher = TestSuite.Patcher();+ mockLog = mockFunction();+ patcher.apply("console.log", mockLog);+ patcher.apply("console.error", undefined);+ patcher.apply("console.info", undefined);+ patcher.apply("console.warn", undefined);+ patcher.apply("console.trace", undefined);+ },++ tearDown: function() {+ patcher.undo();+ },++ // Check that log is called when error is not defined+ testError: function() {+ Logging.Logger().error("foo");+ verify(mockLog)("foo");+ },++ // Check that log is called when info is not defined+ testInfo: function() {+ Logging.Logger().info("foo");+ verify(mockLog)("foo");+ },++ // Check that warn is called when error is not defined+ testWarn: function() {+ Logging.Logger().warn("foo");+ verify(mockLog)("foo");+ },++ // Check that there is no error when trace is not defined+ testTrace: function() {+ Logging.Logger().trace();+ }++}));+diff --git a/test/Worldview/testWorldview.js b/test/testWorldview.jssimilarity index 56%rename from test/Worldview/testWorldview.jsrename to test/testWorldview.jsindex e1746a3bf..cdff2149d 100644--- a/test/Worldview/testWorldview.js+++ b/test/testWorldview.js@@ -9,7 +9,16 @@* All Rights Reserved.*/-TestCase("Worldview.namespace", {+TestCase("Worldview.general", TestSuite.TestCases({++ testToISODateString: function() {+ assertEquals("2013-03-15",+ Worldview.toISODateString(new Date(2013, 02, 15)));+ }++}));++TestCase("Worldview.namespace", TestSuite.TestCases({tearDown: function() {if ( Worldview.test) {@@ -40,12 +49,13 @@ TestCase("Worldview.namespace", {assertEquals("foo", Worldview.test.foo);}-});+}));-TestCase("Worldview.error", {+TestCase("Worldview.error", TestSuite.TestCases({patcher: null,mockPanel: null,+ mockLog: null,setUp: function() {// Mock out the panel that is displayed on an error@@ -58,7 +68,8 @@ TestCase("Worldview.error", {.thenReturn(mockPanel);patcher = TestSuite.Patcher();- patcher.apply("Worldview.log", mockFunction());+ mockLog = mockFunction();+ patcher.apply("console.error", mockLog);patcher.apply("YAHOO.widget.Panel", mockPanelConstructor);},@@ -69,41 +80,84 @@ TestCase("Worldview.error", {// Check that error gets written to consoletestErrorConsole: function() {Worldview.error("This is an error");- verify(Worldview.log)("ERROR: This is an error");+ verify(mockLog)("This is an error");},// Check that error text gets placed in the dialogtestErrorPanel: function() {Worldview.error("This is an error");- verify(mockPanel).setBody("This is an error");+ verify(mockPanel).setBody("An unexpected error has occurred." ++ "<br/><br/>This is an error");},// Check that error with cause is written to consoletestErrorWithCause: function() {Worldview.error("This is an error", "with a cause");- verify(Worldview.log)("ERROR: This is an error");- verify(Worldview.log)("Cause: with a cause");+ verify(mockLog)("This is an error: with a cause");},// Check that the cause is not placed in the dialogtestErrorDialogNoCause: function() {Worldview.error("This is an error", "with a cause");- verify(mockPanel).setBody("This is an error");+ verify(mockPanel).setBody("An unexpected error has occurred." ++ "<br/><br/>This is an error");}-});+}));-TestCase("Worldview.error.withoutYahoo", {+TestCase("Worldview.error.withoutYahoo", TestSuite.TestCases({++ patcher: null,setUp: function() {- patcher.apply("Worldview.log", mockFunction());+ patcher = TestSuite.Patcher();+ patcher.apply("console.error", mockFunction());patcher.apply("YAHOO", {});},+ tearDown: function() {+ patcher.undo();+ },+// Make sure function still works without Yahoo.testErrorConsole: function() {Worldview.error("This is an error");- verify(Worldview.log)("ERROR: This is an error");+ verify(console.error)("This is an error");}-});+}));++TestCase("Worldview.getObjectByPath", TestSuite.TestCases({++ ns: null,++ setUp: function() {+ ns = Worldview;+ window.__TEST_GET_OBJECT_BY_PATH = {};+ window.__TEST_GET_OBJECT_BY_PATH.Foo = {};+ },++ tearDown: function() {+ delete window.__TEST_GET_OBJECT_BY_PATH;+ },+++ // Check that the correct object is obtained+ testValid: function() {+ __TEST_GET_OBJECT_BY_PATH.Foo.bar = "baz";+ assertEquals("baz",+ ns.getObjectByPath("__TEST_GET_OBJECT_BY_PATH.Foo.bar"));+ },++ // Check that an error is thrown on an invalid path+ testInvalidPath: function() {+ try {+ ns.getObjectByPath("__TEST_GET_OBJECT_BY_PATH.XXX.bar");+ fail("Should not have been a valid path");+ } catch ( message ) {+ assertEquals("In __TEST_GET_OBJECT_BY_PATH.XXX.bar, XXX is " ++ "undefined", message);+ }+ }++}));