Heat

是用于创建热力图的类,热力图以颜色来表现数据强弱大小及分布趋势。

构造函数

构造函数
TMap.visualization.Heat(options:HeatOptions)

方法

方法 返回值 说明
setMin(min:Number) this 设置热力最弱阈值,小于该值的不显示,默认为0。
getMin() Number 获取热力最弱阈值。
setMax(max:Number) this 设置热力最强阈值,大于该值的显示为最强色,默认为数据中的最大值。
getMax() Number 获取热力最强阈值。
setRadius(radius: Number) this 设置热力图辐射半径。
getRadius() Number 获取热力图辐射半径。
setGradientColor(gradientColor: GradientColor) this 设置热力图渐变颜色。
getGradientColor() GradientColor 获取热力图渐变颜色。
setHeight(height: Number) this 设置热力图高度。
getHeight() Number 获取热力图高度。
setOpacity(opacity: Number) this 设置热力图透明度。
getOpacity() Number 获取热力图透明度。
setThreshold(min:Number, max:Number) this 设置热力阈值范围。
setData(dataList:HeatPoint[] ) this 设置数据。
addTo(map:Map ) this 添加至指定地图实例。
show() this 显示图层。
hide() this 隐藏图层。
remove() this 从地图中删除图层。
destroy() this 销毁图层对象。

GradientColor

渐变色对象规范。

属性

名称 类型 说明
[offset] String 对应offset偏移量的颜色(offset取值范围为0~1),颜色支持rgb(), #RRGGBB格式。