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
// image service contains wind speed and direction variables which can be visualized// with VectorFieldRenderer. VectorFieldRenderer has size visual variables set for magnitude// and rotation visual variables set for directionsconst layer = new ImageryLayer({
url: "https://sampleserver6.geosceneonline.cn/arcgis/rest/services/ScientificData/NDFD_wind/ImageServer",
renderer: {
type: "vector-field",
style: "beaufort-kn", // Beaufort point symbol (knots)flowRepresentation: "flow-from", // show flow from angle for wind directionsymbolTileSize: 10, // draw one symbol in every 10x10 pixelsvisualVariables: [
{
type: "size",
field: "Magnitude", // values read from the first bandmaxDataValue: 32,
maxSize: "100px",
minDataValue: 0.04,
minSize: "8px" },
{
type: "rotation",
field: "Direction", // values read from the second bandrotationType: "geographic" }
]
}
});