通过 viewer.scene.open打开一个场景后,
然后通过以下方法去添加热力图:
var mycanvas=document.getElementsByClassName("heatmap-canvas");
var imgData= mycanvas[1].toDataURL("image/png");
var img = new Image();
img.src = imgData;
img.onload = function() {
for(var i=0;i<layers_hot.length;i++) {
layer=layers_hot[i];
layer.addOverlayImage({
bounds: {
west: layer._layerBounds.west,
south: layer._layerBounds.south,
east: layer._layerBounds.east,
north: layer._layerBounds.north
},
name: 'heat-map' + Date.now(),
image: img
});
}
}
提问:在这种方法下我如何在这个场景下去移除这个热力图效果,或者说我如何动态的去改变热力图的数据,实现热力图的动态效果