Constructor
new GeoHeatMap(options)
构造函数
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 参数列表
Properties
|
Example
$.ajax({
type: 'GET',
url: 'https://www.thingjs.com/uearth/uEarthjs/temp_resource/heatmapData.txt',
dataType: 'json',
success: function (data) {
var heatmapLayer = app.create({
type: 'ThingLayer',
name: 'heatmapLayer'
});
const geoHeatMap = app.create({
type: 'GeoHeatMap',
name: 'geoHeatMap',
dataSource: data,
renderer: {
radius: 20, // 影响半径
minOpacity: 0.2, //最大值对应的透明度
maxOpacity: 0.8, //最小值对应的透明度
mosaic:true, //是否叠加马赛克效果,默认为false
mosaicSize:10 //单个马赛克尺寸
}
});
heatmapLayer.add(geoHeatMap);
map.userLayers.add(heatmapLayer);
}
});
Extends
- THING.BaseObject
Members
dataSource :Array
生成热力图使用的数据源 格式为[{x:经度,y:纬度,value:值},{x:经度,y:纬度,value:值},{x:经度,y:纬度,value:值}] 其中value是可选的
Type:
- Array
Example
geoHeatMap.dataSource = [{x:116.45523,y:39.90487,value:2},{x:116.3077,y:39.97615,value:10}];
renderer :CMAP.GeoHeatMapRenderer
热力图的渲染样式