NASA GIBS in BaseLayer replacement, help with timeline slider

SO here’s my code:

<!doctype html>

NASA Gibs test file by Jim Lee #cesiumContainer { background-color: #000000; position: absolute; top: 0; left: 0; width: 100%; height: 100%; } #baseLayerPickerContainer { position:absolute; top:5px; right:5px; width:38px; height:38px; border:0; } .cesium-viewer-toolbar { display: block; position: absolute; top: 5px; right: 42px; }

The commented out function “onClockUpdate” is from the GIBS example file however I cannot figure out a way to make it work in my application.

Currently, if you switch from Black Marble to MODIS Terra it will load the current day’s image according to the slider. If you move the slider, nothing happens unless you switch to any other layer then back to MODIS Terra.

I cannot find a way to mix these codes, please help. I explored afterExecute but failed to find anything that will live update the current NASA layer, then end that updating feature listener when you switch to a layer that does not need it.

My goal here is to add all the default layers back into my replacement BaseLayer picker, add the terrain layers, then create a new section underneath that is labeled “NASA Layers” and include the entire GIBS library. I have that currently on my Google Earth app and this is my first step in migrating to Cesium.

Here is the full list of NASA layers (and AGI’s satellite tracker, which I really want in my new app, hint hint):

{ layer: “kml-agi01”, kml: “http://adn.agi.com/SatelliteDatabase/KmlNetworkLink.aspx”, source: “Analytical Graphics, Inc. (AGI)”, sourceURL: “http://www.agi.com/resources/satdb/satdbpc.aspx”, name: “Satellite Tracker”},
{ section: “MODIS Terra” },
{ layer: “MODIS_Terra_CorrectedReflectance_TrueColor”, name: “Corrected Reflectance (True Color)”},
{ layer: “MODIS_Terra_SurfaceReflectance_Bands143”, name: “Land Surface Reflectance (True Color)”},
{ layer: “MODIS_Terra_CorrectedReflectance_Bands721”, name: “Corrected Reflectance (Bands 7-2-1)”},
{ layer: “MODIS_Terra_SurfaceReflectance_Bands721”, name: “Land Surface Reflectance (Bands 7-2-1)”},
{ layer: “MODIS_Terra_CorrectedReflectance_Bands367”, name: “Corrected Reflectance (Bands 3-6-7)”},
{ layer: “MODIS_Terra_SurfaceReflectance_Bands121”, name: “Land Surface Reflectance (Bands 1-2-1)”},
{ layer: “MODIS_Terra_Snow_Cover”, name: “Snow Cover”},
{ layer: “MODIS_Terra_Sea_Ice”, name: “Sea Ice”},
{ layer: “MODIS_Terra_Land_Surface_Temp_Day”, name: “Land Surface Temperature (day)”},
{ layer: “MODIS_Terra_Land_Surface_Temp_Night”, name: “Land Surface Temperature (night)”},
{ layer: “MODIS_Terra_Brightness_Temp_Band31_Day”, name: “Brightness Temperature(Band 31, day)”},
{ layer: “MODIS_Terra_Brightness_Temp_Band31_Night”, name: “Brightness Temperature(Band 31, night)”},
{ layer: “MODIS_Terra_Water_Vapor_5km_Day”, name: “Water Vapor (day)”},
{ layer: “MODIS_Terra_Water_Vapor_5km_Night”, name: “Water Vapor (night)”},
{ layer: “MODIS_Terra_Cloud_Top_Pressure_Day”, name: “Cloud Top Pressure (day)”},
{ layer: “MODIS_Terra_Cloud_Top_Pressure_Night”, name: “Cloud Top Pressure (night)”},
{ layer: “MODIS_Terra_Cloud_Top_Temp_Day”, name: “Cloud Top Temperature (day)”},
{ layer: “MODIS_Terra_Cloud_Top_Temp_Night”, name: “Cloud Top Temperature (night)”},
{ layer: “MODIS_Terra_Data_No_Data”, name: “Data-No Data Mask”},
{ layer: “MODIS_Terra_Aerosol”, name: “Aerosol Optical Depth”},
{ layer: “MODIS_Aqua_CorrectedReflectance_TrueColor”, name: “Corrected Reflectance (True Color)”},
{ layer: “MODIS_Aqua_SurfaceReflectance_Bands143”, name: “Land Surface Reflectance (True Color)”},
{ layer: “MODIS_Aqua_CorrectedReflectance_Bands721”, name: “Corrected Reflectance (Bands 7-2-1)”},
{ layer: “MODIS_Aqua_SurfaceReflectance_Bands721”, name: “Land Surface Reflectance (Bands 7-2-1)”},
{ layer: “MODIS_Aqua_SurfaceReflectance_Bands121”, name: “Land Surface Reflectance (Bands 1-2-1)”},
{ layer: “MODIS_Aqua_Snow_Cover”, name: “Snow Cover”},
{ layer: “MODIS_Aqua_Sea_Ice”, name: “Sea Ice”},
{ layer: “MODIS_Aqua_Land_Surface_Temp_Day”, name: “Land Surface Temperature (day)”},
{ layer: “MODIS_Aqua_Land_Surface_Temp_Night”, name: “Land Surface Temperature (night)”},
{ layer: “MODIS_Aqua_Brightness_Temp_Band31_Day”, name: “Brightness Temperature(Band 31, day)”},
{ layer: “MODIS_Aqua_Brightness_Temp_Band31_Night”, name: “Brightness Temperature(Band 31, night)”},
{ layer: “MODIS_Aqua_Water_Vapor_5km_Day”, name: “Water Vapor (day)”},
{ layer: “MODIS_Aqua_Water_Vapor_5km_Night”, name: “Water Vapor (night)”},
{ layer: “MODIS_Aqua_Cloud_Top_Pressure_Day”, name: “Cloud Top Pressure (day)”},
{ layer: “MODIS_Aqua_Cloud_Top_Pressure_Night”, name: “Cloud Top Pressure (night)”},
{ layer: “MODIS_Aqua_Cloud_Top_Temp_Day”, name: “Cloud Top Temperature (day)”},
{ layer: “MODIS_Aqua_Cloud_Top_Temp_Night”, name: “Cloud Top Temperature (night)”},
{ layer: “MODIS_Aqua_Data_No_Data”, name: “Data-No Data Mask”},
{ layer: “MODIS_Aqua_Aerosol”, name: “Aerosol Optical Depth”},
{ layer: “MODIS_Combined_Value_Added_AOD”, name: “Terra and Aqua MODIS Combined Value-Added
Aerosol Optical Depth”},
{ section: “AIRS” },
{ layer: “AIRS_Dust_Score”, name: “Dust Score”},
{ layer: “AIRS_CO_Total_Column_Day”, name: “Carbon Monoxide (Total Column, Day)”},
{ layer: “AIRS_CO_Total_Column_Night”, name: “Carbon Monoxide (Total Column, Night)”},
{ layer: “AIRS_Prata_SO2_Index_Day”, name: “Sulphur Dioxide (Day, Prata Algorithm)”},
{ layer: “AIRS_Prata_SO2_Index_Night”, name: “Sulphur Dioxide (Night, Prata Algorithm)”},
{ layer: “AIRS_Precipitation_Day”, name: “Precipitation Estimate (Day)”},
{ layer: “AIRS_Precipitation_Night”, name: “Precipitation Estimate (Night)”},
{ section: “OMI” },
{ layer: “OMI_Cloud_Pressure”, name: “Cloud Pressure”},
{ layer: “OMI_Aerosol_Index”, name: “Aerosol Index”},
{ layer: “OMI_Aerosol_Optical_Depth”, name: “Aerosol Optical Depth”},
{ layer: “OMI_Absorbing_Aerosol_Optical_Depth”, name: “Absorbing Aerosol Optical Depth”},
{ layer: “OMI_SO2_Planetary_Boundary_Layer”, name: “Sulfur Dioxide (Planetary Boundary Layer)”},
{ layer: “OMI_SO2_Lower_Troposphere”, name: “Sulfur Dioxide (Lower Troposphere)”},
{ layer: “OMI_SO2_Middle_Troposphere”, name: “Sulfur Dioxide (Middle Troposphere)”},
{ layer: “OMI_SO2_Upper_Troposphere_and_Stratosphere”, name: “Sulfur Dioxide (Upper Troposphere and Stratosphere)”},
{ section: “Aura MLS” },
{ layer: “MLS_CO_215hPa_Day”, name: “Carbon Monoxide (CO)at 215 hPa (Day)”},
{ layer: “MLS_CO_215hPa_Night”, name: “Carbon Monoxide (CO)at 215 hPa (Night)”},
{ layer: “MLS_H2O_46hPa_Day”, name: “Water Vapor (H2O)at 46 hPa (Day)”},
{ layer: “MLS_H2O_46hPa_Night”, name: “Water Vapor (H2O)at 46 hPa (Night)”},
{ layer: “MLS_HNO3_46hPa_Day”, name: “Nitric Acid (HNO3)at 46 hPa (Day)”},
{ layer: “MLS_HNO3_46hPa_Night”, name: “Nitric Acid (HNO3)at 46 hPa (Night)”},
{ layer: “MLS_N2O_46hPa_Day”, name: “Nitrous Oxide (N2O)at 46 hPa (Day)”},
{ layer: “MLS_N2O_46hPa_Night”, name: “Nitrous Oxide (N2O)at 46 hPa (Night)”},
{ layer: “MLS_O3_46hPa_Day”, name: “Ozone (O3)at 46 hPa (Day)”},
{ layer: “MLS_O3_46hPa_Night”, name: “Ozone (O3)at 46 hPa (Night)”},
{ layer: “MLS_SO2_147hPa_Day”, name: “Sulfur Dioxide (SO2)at 147 hPa (Day)”},
{ layer: “MLS_SO2_147hPa_Night”, name: “Sulfur Dioxide (SO2)at 147 hPa (Night)”},
{ layer: “MLS_Temperature_46hPa_Day”, name: “Temperatureat 46 hPa (Day)”},
{ layer: “MLS_Temperature_46hPa_Night”, name: “Temperatureat 46 hPa (Night)”},

I zipped my test file

Any help would be greatly appreciated:

  • a reference for recreating all the default Imagery layers and Terrain Providers?
  • how to create a “NASA Imagery” section underneath with above listed NASA layers
  • When selected on NASA layer, slider works to set proper date for GIBS imagery

NASA-test.zip (4.24 MB)

I have recreated all the default BaseLayers and inserted the NASA layers. I still need help typing the NASA layers to the timeline slider using _.throttle