Skip to main content

Class: Barbs<ArrayType, GridType, MapType>

Defined in: Barbs.ts:193

A class representing a field of wind barbs. The barbs are automatically thinned based on the zoom level on the map; the user only has to provide a thinning factor at zoom level 1.

Grid Compatibility​

  • ✅ PlateCarreeGrid
  • ✅ PlateCarreeRotatedGrid
  • ✅ LambertGrid
  • ✅ UnstructuredGrid
  • ❌ RadarSweepGrid
  • ❌ Geostationary

Example​

// Create a barb field with black barbs and plotting every 16th wind barb in both i and j at zoom level 1
const vector_field = new RawVectorField(grid, u_data, v_data);
const barbs = new Barbs(vector_field, {color: '#000000', thin_fac: 16});

Extends​

Type Parameters​

Type Parameter
ArrayType extends TypedArray
GridType extends AutoZoomGrid
MapType extends MapLikeType

Constructors​

Constructor​

new Barbs<ArrayType, GridType, MapType>(fields, opts): Barbs<ArrayType, GridType, MapType>

Defined in: Barbs.ts:207

Create a field of wind barbs

Parameters​

ParameterTypeDescription
fieldsRawVectorField<ArrayType, GridType>The vector field to plot as barbs
optsBarbsOptionsOptions for creating the wind barbs

Returns​

Barbs<ArrayType, GridType, MapType>

Overrides​

PlotComponent.constructor

Properties​

PropertyModifierTypeDefined in
optsreadonlyRequired<BarbsOptions>Barbs.ts:196

Methods​

updateField()​

updateField(fields): Promise<void>

Defined in: Barbs.ts:223

Update the field displayed as barbs

Parameters​

ParameterTypeDescription
fieldsRawVectorField<ArrayType, GridType>The new field to display as barbs

Returns​

Promise<void>