AnimatedFlowRenderer

AMD: require(["esri/renderers/AnimatedFlowRenderer"], (AnimatedFlowRenderer) => { /* code goes here */ });
ESM: import AnimatedFlowRenderer from "@arcgis/core/renderers/AnimatedFlowRenderer";
Class: esri/renderers/AnimatedFlowRenderer
Inheritance: AnimatedFlowRenderer Accessor
Since: ArcGIS API for JavaScript 4.22
beta

The AnimatedFlowRenderer allows you to visualize your raster data with animated streamlines. This renderer can be used to visualize flow direction and magnitude information for meteorology and oceanography raster data.

To use this renderer, the source type of your raster dataset must be Vector-UV or Vector-MagDir. The direction of the raster defines the direction of movement, and the magnitude defines the visible length of the streamline.

animated flow renderer

Known Limitations

  • The AnimatedFlowRenderer is only supported with ImageryTileLayer and ImageryLayer.
  • The AnimatedFlowRenderer is only supported in 2D MapView.
  • The AnimatedFlowRenderer is not supported in the Legend widget.
See also:
Example:
const renderer = new AnimatedFlowRenderer({
  density: 1, // visualization will have the maximum amount of streamlines
  lineColor: [50, 120, 240], // blue
  lineSpeed: 10,
  lineWidth: "2px"
});

Constructors

new AnimatedFlowRenderer(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Example:
let renderer = {
  type: "animated-flow",
  color: [50, 120, 240]
}

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Show inherited properties Hide inherited properties
Name Type Summary Class
Stringmore details

The name of the class.

more detailsAccessor
Numbermore details

The density of the animated streamlines.

more detailsAnimatedFlowRenderer
Numbermore details

The time it takes for the streamline to fade.

more detailsAnimatedFlowRenderer
Colormore details

The color of the animated streamlines.

more detailsAnimatedFlowRenderer
Numbermore details

The maximum length animated streamlines will travel in points.

more detailsAnimatedFlowRenderer
Numbermore details

The speed of the animated streamlines, relative to the simulation time.

more detailsAnimatedFlowRenderer
Numbermore details

The width of the animated streamlines in points.

more detailsAnimatedFlowRenderer
Stringmore details

The type of Renderer.

more detailsAnimatedFlowRenderer

Property Details

declaredClass Stringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

density Number

The density of the animated streamlines. This will determine how many lines appear in the visualization. Accepted values are between 0 and 1. A value of 0 means no lines will be rendered. A value of 1 will render the maximum number of lines.

density = 0.1 density = 0.5 density = 1
density 0.1 density 0.5 density 1
Default Value:0.8
fadeDuration Number

The time it takes for the streamline to fade. The streamlines will appear shorter when the fadeDuration is a smaller number, since they will start to fade before they reach the full lineLength.

fadeDuration = 20 fadeDuration = 100 fadeDuration = 250
fadeDuration 20 fadeDuration 100 fadeDuration 250
Default Value:100
lineColor Color

The color of the animated streamlines.

Default Value:[255, 255, 255]
lineLength Numberautocast
Autocasts from Number|String

The maximum length animated streamlines will travel in points. Only a portion of the streamline will be visible at a time depending on the magnitude or UV coming from the raster layer and the defined fadeDuration. During the course of the animation, the visible streamline will travel to reach the line length defined here, then will restart. This value may be autocast with a string expressing size in points or pixels (e.g. 100px).

Default Value:200
Examples:
// width in points
animatedFlowRenderer.lineLength = 100;
// width in pixels
animatedFlowRenderer.lineLength = "200px";
// width in points
animatedFlowRenderer.lineLength = "100pt";
lineSpeed Number

The speed of the animated streamlines, relative to the simulation time.

Default Value:10
lineWidth Numberautocast
Autocasts from Number|String

The width of the animated streamlines in points. This value may be autocast with a string expressing size in points or pixels (e.g. 3px).

Default Value:1.5
Examples:
// width in points
animatedFlowRenderer.lineWidth = 4;
// width in pixels
animatedFlowRenderer.lineWidth = "2px";
// width in points
animatedFlowRenderer.lineWidth = "4pt";
type Stringreadonly

The type of Renderer.

For AnimatedFlowRenderer the type is always "animated-flow".

Method Overview

Name Return Type Summary Class
AnimatedFlowRenderermore details

Creates a deep clone of the renderer.

more detailsclone
*more details

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product.

more detailsAnimatedFlowRenderer
Objectmore details

Converts an instance of this class to its ArcGIS portal JSON representation.

more detailsAnimatedFlowRenderer

Method Details

clone(){AnimatedFlowRenderer}inner

Creates a deep clone of the renderer.

Returns:
Type Description
AnimatedFlowRenderer
Example:
// Creates a deep clone of the first layer's renderer
let renderer = view.map.layers.getItemAt(0).renderer.clone();
fromJSON(json){*}static

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter:
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns:
Type Description
* Returns a new instance of this class.
toJSON(){Object}

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns:
Type Description
Object The ArcGIS portal JSON representation of an instance of this class.

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