CesiumHeatmap

new Cesium.CesiumHeatmap()

热力图对象

Methods

static Cesium.CesiumHeatmap.create(viewer, boundingbox, options)Object

Name Type Description
viewer Viewer 场景视图
boundingbox Rectangle 热力图范围
options Object 可选参数
Name Type Default Description
minCanvasSize Number 700 optional 热力图画布最小尺寸
maxCanvasSize Number 2000 optional 热力图画布最大尺寸
radiusFactor Number 60 optional 如果没有给出半径,则使用数据点大小因子(高度和宽度中的较大者除以这个数字产生使用的半径)
spacingFactor Number 1.5 optional 边界周围的额外空间(点半径乘以这个数字产生间距)
maxOpacity Number 0.8 optional 如果未在热力图选项对象中给出,则使用的最大不透明度
minOpacity Number 0.1 optional 如果未在热图选项对象中给出,则使用的最小不透明度
blur Number 0.85 optional 如果未在热力图选项对象中给出,则使用的模糊值为0.85。模糊值越高,渐变越平滑。
gradient Number {'0.3':'rgb(0,0,255)','0.65':'yellow','0.8':'orange','0.95':'red'} optional 热力图颜色梯度
canChange Boolean true optional 默认自动重算热力半径
Returns:
返回heatmap的实例化对象
Example:
var heatMapData = [{x: 112, y: 30, value: 10}, {x: 113, y: 31, value: 20}];

var bounds = {
    west: 112,
    east: 113,
    south: 30,
    north: 31
};

var heatMap = Cesium.CesiumHeatmap.create(viewer, bounds, {
    radius: 8,
    maxOpacity: 0.8,
    minOpacity: 0.2,
    useClustering: true,
    blur: 0.75,
    gradient: {'0.3':'rgb(0,0,255)','0.65':'yellow','0.8':'orange','0.95':'red'},
    alpha: 0.8,
};

static Cesium.CesiumHeatmap.mercatorToWgs84()

Convert a mercator location into a WGS84 location p: the mercator lcation like {x, y}