Class rendererDensityMap

An auto-ranging density map renderer.

class

rendererDensityMap

Index

Constructor methods

Methods

Constructor methods

constructor(): rendererDensityMap

Returns

rendererDensityMap

Methods

public notifyRecompute(extents?: envelope)

Tells renderer to re-render density map and recompute ranges. This should be called if the data changes or if, due to extent changes, the density changes.

Parameters

public setBleed(bleed: number)

Sets the bleed ratio, which is the sets the percentage of the margin around each tile to use in the tile's computation. Note: some bleed (i.e., greater than 1) is required since a heat map relies on adjacent data.

Parameters

  • bleed: number

    The desired bleed ratio.

public setColorMatrix(matrix: Array<number[]>)

Sets color ranges from cold to hot for the renderer.

Parameters

  • matrix: Array<number[]>

    Array of arrrays of numbers, each of the form [r,g,b,a], where each array represents a color and colors range from cold to hot. Note: Typically, a dozen colors is sufficient.

public setFilterStdDevRadius(filterStdDevRadius: number)

Sets filter radius corresponding to standard deviations. The filter radius is the cutoff point at which adjacent cells no longer contribute to a cell's calculation.

Parameters

  • filterStdDevRadius: number

    Number of standard deviations from the mean of a normal distribution to which to give positive weight.

public setGridSize(gridSize: number)

Sets the number of rows and columns of cells to be used for computation within the grid.

Parameters

  • gridSize: number

    Number of rows and columns used in the grid.

public setMinCellValue(min: number)

Sets the minimum required cell value for a cell to receive a color. Default minimum value is 0.

Parameters

  • min: number

public setRowAction(action: (row: any) => number)

Sets an optional action to perform on each row. This enables processing the values on one or more columns for each row for use in the density map computations.

Parameters

  • action: (row: any) => number