This sample shows how to apply the FlowRenderer to an ImageryTileLayer to create an animated streamline visualization of wind speed and direction during Hurricane Ida in August 2021.
The FlowRenderer can only be used with raster datasets that have a Vector-
or Vector-
source type.
The direction of the raster defines the direction of movement, and the magnitude defines the length of the streamline.
The FlowRenderer can only be used with ImageryLayer and ImageryTileLayer in a 2D MapView. The following code snippet shows how to apply this renderer to an ImageryTileLayer. You can use the sliders and components in the Controls panel to adjust the property values of FlowRenderer.
const layer = new ImageryTileLayer({
url: "https://tiledimageservices.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/NLDAS_Hourly_8_30_2021/ImageServer",
title: "Winds",
renderer: {
type: "flow", // autocasts to new FlowRenderer
trailWidth: "2px",
density: 1,
visualVariables: [{
type: "color",
field: "Magnitude",
stops: [
{ color: [40, 146, 199, 1], value: 0 },
{ color: [160, 194, 155, 1], value: 5 },
{ color: [218, 230, 119, 1], value: 10 }
]
}]
},
effect: "bloom(1.5, 0.5px, 0)"
});