跳到主要内容

添加热力图

在场景中添加热力图。

代码示例
let data = 
{
"type": "FeatureCollection",
"name": "sip_random_pts500",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"features": [{
"type": "Feature",
"properties": {
"id": 0,
"value": 166
},
"geometry": {
"type": "Point",
"coordinates": [120.718523349502078, 31.338130635766667]
}
},
{
"type": "Feature",
"properties": {
"id": 1,
"value": 248
},
"geometry": {
"type": "Point",
"coordinates": [120.722053037450294, 31.331913958288187]
}
},
{
"type": "Feature",
"properties": {
"id": 2,
"value": 129
},
"geometry": {
"type": "Point",
"coordinates": [120.727000238170334, 31.324249005009641]
}
},
{
"type": "Feature",
"properties": {
"id": 3,
"value": 224
},
"geometry": {
"type": "Point",
"coordinates": [120.721232120115744, 31.323435747640318]
}
}
]
}

mapmostUE.addHeatmap(data, {
range: [0, 600],
radius: 120,
height: 3600.0,
opacity:0.85,
positionHeight:16
})
效果
show