热力图图层
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
对象有下面这些属性:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
global |
Object | 三维球对象(YouScene.earth) |
- Implements:
Example:
var heatMapLayer = youScene.layers.addHeatMapLayer({
rectangle: {
west: 100.0,
south: 10.0,
east: 130.0,
north: 50.0
},
heatmap: {
radius: 50,
maxOpacity: .8,
minOpacity: .1,
blur: .85,
backgroundColor: Color.WHITE,
gradient: {
25: YS.Color.fromRGBA(0, 166, 0, 255),
50: YS.Color.fromRGBA(229, 229, 0, 255),
75: YS.Color.fromRGBA(0, 229, 164, 255),
100: YS.Color.fromRGBA(242, 242, 242, 255)
}
},
min: 0,
max: 100,
points: [{x:100,y:20,z:20},{x:101,y:20,z:50},{x:100,y:21,z:80}]
});
Demo:
Methods
-
添加图层
Name Type Description global
Object 三维球对象(YouScene.earth) options
Object 对象有下面这些属性: Name Type Description min
Number 数据最小值 max
Number 数据最大值 points
Array.<XYZ> 热力图数据,z值是value,xy是经纬度坐标,单位度 - Implements:
-
销毁
- Implements:
-
更新图层
Name Type Description min
Number 数据最小值 max
Number 数据最大值 points
Array.<XYZ> 热力图数据,z值是value,xy是经纬度坐标,单位度