You are using a browser that is no longer supported. Please use the latest version of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. For more information please see the System Requirements.

Unsupported browser

You are using a browser that is not supported. JavaScript API works on the latest versions of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. Use one of these browsers and provide your feedback through GeoNet, the Esri Community.

  • {i18n.unsupportedBrowser.chrome}
  • Firefox
  • Safari
  • undefined
Loading...

Note: Support for 3D on mobile devices may vary, view the system requirements for more information.

This sample shows how to add an instance of WCSLayer to a Map in a MapView. The WCSLayer contains global sea temperature data.

The RasterStretchRenderer is applied to the layer to change the data visualization. The multidimensionalDefinition property is also set on the layer to request a specific slice.

// raster stretch renderer with 3 standard-deviations
// and with a multipart color ramps
var renderer = {
  type: "raster-stretch",
  stretchType: "standard-deviation",
  statistics: [[-3, 37, 1, 1]],
  numberOfStandardDeviations: 3,
  colorRamp: {
    type: "multipart",
    colorRamps: [
      {
        fromColor: [0, 0, 255],
        toColor: [0, 255, 255]
      },
      {
        fromColor: [0, 255, 255],
        toColor: [255, 255, 0]
      },
      {
        fromColor: [255, 255, 0],
        toColor: [255, 0, 0]
      }
    ]
  }

// multi dimension definition for the layer
var multidimensionalDefinition = [
  {
    variableName: "water_temp",
    dimensionName: "StdTime",
    values: [1396828800000] // Monday, April 7, 2014 12:00:00 AM GTM
  },
  {
    variableName: "water_temp", // water temp at sea level
    dimensionName: "StdZ",
    values: [0]
  }
];

// WCSLayer from ArcGIS Server
layer = new WCSLayer({
  url:
    "https://sampleserver6.arcgisonline.com/arcgis/services/ScientificData/SeaTemperature/ImageServer/WCSServer",
  renderer: renderer,
  multidimensionalDefinition: multidimensionalDefinition,
  version: "2.0.1",
  opacity: 0.5,
});

Sample search results

TitleSample
Loading...