Constructor
new MarkHeatMap3D(options)
Example
var heat3DMap;
var vPointsGeo = [];
// 使用JQuery异步请求热力图数据,解析为所需格式
$.ajax({
type: "get",
url: "../data/heatData.json",
dataType: "json",
success: function (response) {
for(var i = 0; i < response.heatData.length; i++) {
var point = new Cesium.Cartesian3(response.heatData[i].lng, response.heatData[i].lat);
vPointsGeo.push(point);
}
var colors = new Array(5);
colors[0] = new Cesium.Color(1, 0, 1, 1);
colors[1] = new Cesium.Color(0, 0.3, 1, 1);
colors[2] = new Cesium.Color(0, 0.5, 0, 1);
colors[3] = new Cesium.Color(1, 0.1, 0, 1);
colors[4] = new Cesium.Color(0.7, 0, 0, 1);
heat3DMap = new MarkHeatMap3D({
data : vPointsGeo,
colors : colors,
consideringWeight : true,
clusterRadius : 10,
heightMax : 2000,
numSplitRow : 510,
numSplitCol : 60,
wireframe : false
});
// 新建标绘图层,并将三维热力图标绘添加进去
var layer = mainControl.plotDoc.add(new PlotLayer({
viewer : mainControl.viewer,
name : "polylineLayer",
}));
layer.add(heat3DMap);
});
});
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 拥有以下属性的对象:
Properties
|
Members
clusterRadius :Number
- Default Value:
- 5
获取或设置热力半径(单位,像素)。
Type:
- Number
colors :Array.<Cesium.Color>
获取或设置创建三维热力图使用的色带。
Type:
- Array.<Cesium.Color>
consideringWeight :Boolean
- Default Value:
- false
获取或设置创建三维热力图时是否考虑权重。
Type:
- Boolean
data :Array.<Cesium.Cartesian3>
获取或设置Cartesian3形式的数据数组,前两位为数据点的经纬度坐标,最后一位为权重值。
Type:
- Array.<Cesium.Cartesian3>
heightMax :Number
- Default Value:
- 1000
获取或设置最大拔高高度。
Type:
- Number
(readonly) id :String
获取三维热力图标绘的唯一标识符。
Type:
- String
numSplitCol :Number
- Default Value:
- 1024
获取或设置纵向分割数。
Type:
- Number
numSplitRow :Number
- Default Value:
- 512
获取或设置横向分割数。
Type:
- Number
show :Boolean
- Default Value:
- true
获取或设置三维热力图标绘的显示或隐藏。
Type:
- Boolean
wireframe :Boolean
- Default Value:
- false
获取或设置是否为线框模式。
Type:
- Boolean