[+] Help >> Use ORNL DAAC OGC Map Widget

Use ORNL DAAC OGC Map Widget


Demonstration 1: Simplest Map Widget

Demonstration 2: Fully Configured Map Widget

Demonstration 3: Map Widget with Multiple WMS Layers

Tutorial

Features to be Added


Demonstration 1: Simplest Map Widget


The above ORNL DAAC WMS Viewer widget displays an dynamic map for Land Cover Type 1 (2001): IGBP global vegetation classification scheme. With the simplest configuration, users can double click to zoom in, pan the map, and use mouse wheel to zoom in/out the map interactively.


Javascript Code:
  var widget1 = new SDAT.MapWidget(
    'mapdiv1',
    { layers: ["10004_1"] },
    { bTitle: false },
    { bNavigator: false }
  );



Demonstration 2: Fully Configured Map Widget


The ORNL DAAC WMS Viewer widget can be configured to include title, different background layers (including Google maps), navigation tools, layer opacity slider, layer switcher, scale bar, and time step selector (if a layer contains multiple time steps).


Javascript Code:
  var widget2 = new SDAT.MapWidget(
    'mapdiv2',
    {
      layers: ["228_1"]
    },
    {
      height: 300,
      width: 400,
      bTitle: true,
      bBorder: true,
      baseLayers: ["ROADMAP","SATELLITE","HYBRID","TERRAIN","WORLD_COUNTRIES"]
    },
    {
      bNavigator: true,
      bMousePosition: true,
      bLayerSwitcher: true,
      bScaleBar: true,
      bOpacitySlider: true,
      bTimeStep: true
    }
  );



Demonstration 3: Map Widget with Multiple WMS Layers


The above ORNL DAAC WMS Viewer widget displays two WMS layers (NLCD 2001 Land Cover and USDA NASS Cropland Data Layer of Year 2006) over Google Physical map. Users can use the Layer Switcher to turn on/off layers.


Javascript Code:
  var widget3 = new SDAT.MapWidget(
    'mapdiv3',
    {
      layers: ["10009_1","10014_1"]
    },
    {
      height: 350,
      width: 700,
      bTitle: true,
      title: "NLCD (2001) and CDL (2006)",
      bBorder: true,
      baseLayers: ["TERRAIN"]
    },
    {
      bNavigator: true,
      bLayerSwitcher: true,
      bScaleBar: true,
    }
  );



Tutorial

Under Development ...



Features to be Added

  • Add a loading icon to show the status while maps are loaded
  • Embed ORNL DAAC logo inside the widget
  • Enable widget to be created in a draggable, resizable, and floating window
  • Add support to display layer legend
  • Improve support for multiple layers
  • ......