1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// raster stretch renderer with 3 standard-deviations
// and with a multipart color ramps
const 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
const 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,
});