Grid

是用于创建网格热力图的类,网格热力图将离散的数据点以正方形网格区域进行聚合,根据落入区域内的数据点数量渲染不同颜色的高度的正方形棱柱。

构造函数

构造函数
TMap.visualization.Grid(options:GridOptions)

方法

方法 返回值 说明
getValueRange() Number[] 获取聚合数据取值范围,[min, max]。
setShowRange(showRange:Number[]) this 设置聚合数据显示区间范围,[min, max]。
setData(dataList:HeatPoint[]) this 设置数据。
addTo(map:Map ) this 添加至指定地图实例。
show() this 显示图层。
hide() this 隐藏图层。
remove() this 删除图层。
destroy() this 销毁图层对象。

事件

事件名 参数 说明
click evt:VisualEvent 点击棱柱时触发。
hover evt:VisualEvent 鼠标悬停目标改变时触发,若悬停在图形外部,则返回结果中的拾取对象为null