FlowRenderer with visual variables

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-UV or Vector-MagDir 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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)"
});

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close