parameters |
object
|
参数
Properties
Name |
Type |
Description |
kind |
String
|
热力图的类型,可选值["texture","cube","cone","particle"],默认值texture; |
container |
HTMLDocument
|
容器,可选,默认值null; |
canvas |
HTMLDocument
|
画布,可选,默认值null; |
width |
number
|
画布的宽,单位是像素,默认是512 |
height |
number
|
画布的高,单位是像素,默认是512 |
min |
string
|
定义数据的最小值,默认是undefined |
max |
number
|
定义数据的最大值,默认是undefined |
data |
object
|
数据,[{x,y,value,longitude,latitude},{x,y,value,longitude,latitude}]
其中x代表canvas的横坐标位置,可选,范围0-width,y代表canvas的纵坐标位置,可选,范围0-height,value是具体值,longitude是经度坐标,可选,latitude是纬度坐标,可选 |
xName |
object
|
如果横坐标名字不是x,则需给出具体的横坐标名字,默认值undefined; |
yName |
object
|
如果纵坐标名字不是y,则需给出具体的纵坐标名字,默认值undefined; |
valueName |
object
|
如果值的名字不是value,则需给出具体的值名字,默认值undefined; |
backgroundColor |
string
|
背景色,默认值"rgba(0,0,0,.95)"; |
gradient |
object
|
渐变色,kind为particle时无效,其他情况有效
默认值{ 0.25: "rgb(0,0,255)", 0.55: "rgb(0,255,0)", 0.85: "yellow", 1.0: "rgb(255,0,0)"}; |
radius |
object
|
每个值的作用范围; |
opacity |
object
|
整体透明度,设置改值后,minOpacity和maxOpacity不起作用; |
minOpacity |
object
|
最小透明度,和值挂钩; |
maxOpacity |
object
|
最大透明度,和值挂钩; |
size |
object
|
几何尺寸,单位是米,如果data里面有longitude,latitude值,可以不使用size;
Properties
Name |
Type |
Description |
x |
number
|
x方向几何长度 |
y |
number
|
y方向几何长度 |
|
center |
object
|
中心点位置,单位是经纬度,如果data里面有longitude,latitude值,可以不使用center;
Properties
Name |
Type |
Description |
x |
object
|
几何中心经度 |
y |
object
|
几何中心纬度 |
z |
object
|
几何中心高度 |
|
minHeight |
object
|
最小高度值,和值挂钩,默认值0; |
maxHeight |
object
|
最大高度值,和值挂钩,默认值500; |
duration |
object
|
变化过渡时间, 单位秒, 默认值1; |
particle |
object
|
kind为particle时,设置粒子参数;
Properties
Name |
Type |
Description |
scaleBoxXY |
number
|
粒子缩放,默认值1,粒子缩放为1时,长宽约为5cm; |
noiseStrength |
number
|
噪声强度,默认值0,用于粒子动画; |
noiseMap |
string
|
噪声贴图,默认noiseMap; |
grayPower |
string
|
热力灰度图强度,默认1,不可为0; |
maxHeight |
string
|
粒子最高高度,默认10,单位2dm; |
countX |
number
|
粒子X轴栅格分辨率。默认400; |
countY |
number
|
粒子Y轴栅格分辨率。默认400; |
|
|