Open tapiokulmala opened 9 years ago
I hit the same issue. Worked around it by resetting the underlying heatmap directly:
this.heatmapLayer.setData(d)
if (d.data.length===0)
this.heatmapLayer._heatmap.setData(d)
I know it is too late, have you tried
heatMap.setData({data:[]});
There seems to be no way to clear all datapoints from the leaflet heatmap overlay. The problem is most likely in the _update function of the leaflet heatmap overlay.
if (this._data.length == 0) { return; }
With h337 it's possible but not with heatmap overlay.