%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
AddHeatMap Method
See Also  Example
vdWebLibrary Namespace > vdrawObj Class : AddHeatMap Method
points
An array of points as an array of doubles [x,y,z]. z value can have the meaning of a measurement at the x,y 2d position. For example a temperature value or a real world elevation.
elevatedcolors
An array of pair values where the 1st item defines a z measurment value and the 2nd value a color as an array of [red(0-255),green(0-255),blue(0-255)] values for the specific z value.
precision
Integer that defines the number of decimals used for the passed points triangulation.
drawit
Defines if the vdPolyline object will be drawn.
entities
The entities collection where the polyline will be added. This can be the entities of layout or a block.
Create a vdPolyface by triangulating the passed points and color it by interpolating the paseed elevatedcolors.

Syntax

JScript 
public function AddHeatMap( 
   points : Object[],
   elevatedcolors : Object[],
   precision : int,
   drawit : boolean,
   entities : Object
) : Object;

Parameters

points
An array of points as an array of doubles [x,y,z]. z value can have the meaning of a measurement at the x,y 2d position. For example a temperature value or a real world elevation.
elevatedcolors
An array of pair values where the 1st item defines a z measurment value and the 2nd value a color as an array of [red(0-255),green(0-255),blue(0-255)] values for the specific z value.
precision
Integer that defines the number of decimals used for the passed points triangulation.
drawit
Defines if the vdPolyline object will be drawn.
entities
The entities collection where the polyline will be added. This can be the entities of layout or a block.

Return Value

A vdPolyface object

Example

C#Copy Code
var points = [ 
                  [0, 0, 0], 
                  [4, 0, 0], 
                  [4, 4, 0], 
                  [0, 4, 0], 
                  [1, 1, 1], 
                  [3, 1, 1], 
                  [3, 3, 1], 
                  [1, 3, 1], 
                  [2, 2, 2] 
       ]; 
  var elevColors = [ 
                    0, [255, 0, 0], 
                    1, [0, 255, 0], 
                    2, [0, 0, 255] 
                   ]; 
vdcanvas.AddHeatMap(points, elevColors, 8, true);

See Also