# Heatmap in Worldmap with timestamp conditional

**URL:** https://discourse.nodered.org/t/heatmap-in-worldmap-with-timestamp-conditional/50438
**Category:** General
**Created:** [31 August 2021 11:53 UTC](https://discourse.nodered.org/t/heatmap-in-worldmap-with-timestamp-conditional/50438 "2021-08-31T11:53:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cheezum](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@cheezum](https://discourse.nodered.org/u/cheezum)
#### Post date: [31 August 2021 11:53 UTC](https://discourse.nodered.org/t/heatmap-in-worldmap-with-timestamp-conditional/50438/1 "2021-08-31T11:53:35Z")

</div>

Hi,

I'm using Worldmap (2.15.5) to visualize traffic. To visualize any traffic jam, I would like to use the heatmap function on it. It's really cool. However, I can't find a way to remove drawn points after a specific time.  
Where Track-points have a TTL (time to live), the heatmap-colouring remains. So, after a while all heat map areas become really dense.

In general I was thinking(hoping) that it might be possible that when a track-point is removed from the map, the corresponding heatmap-point is removed as well.

The attached image shows some tracks, but also heatmap hotspots of trackpoints that no longer exists.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/cac491373fa46b8cb9d8e1910ab6b147664714d0.jpeg)

A similar question (Worldmap/Heatmap with conditionals) was posted earlier but the topic was closed. Therefore I started a new topic.  
I hope I'm not the only one with this question, since I really love this Worldmap node.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [31 August 2021 12:18 UTC](https://discourse.nodered.org/t/heatmap-in-worldmap-with-timestamp-conditional/50438/2 "2021-08-31T12:18:25Z")

</div>

There is an eraser button bottom right of the heatmap that will clear the map and start again  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/5/95593703eab31f3263cadfb65903ca53911fbd73.png)

---

<div class="post-metadata">

### Author: ![cheezum](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@cheezum](https://discourse.nodered.org/u/cheezum)
#### Post date: [31 August 2021 12:25 UTC](https://discourse.nodered.org/t/heatmap-in-worldmap-with-timestamp-conditional/50438/3 "2021-08-31T12:25:13Z")

</div>

Hi dceejay,

That's the point. I don't want to start over. I want the oldest points to be removed. Preferabely based on time, but it can also be on a max number of heatmap points based on the tracks for example.  
So if nothing happens on the map, the hotspot should eventually fade out.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [31 August 2021 15:46 UTC](https://discourse.nodered.org/t/heatmap-in-worldmap-with-timestamp-conditional/50438/4 "2021-08-31T15:46:27Z")

</div>

the underlying library doesn't support that ( see [Leaflet.heat/HeatLayer.js at gh-pages · Leaflet/Leaflet.heat · GitHub](https://github.com/Leaflet/Leaflet.heat/blob/gh-pages/src/HeatLayer.js)) - so I guess it could be coded around but not easily that I can think of.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [30 October 2021 15:46 UTC](https://discourse.nodered.org/t/heatmap-in-worldmap-with-timestamp-conditional/50438/5 "2021-10-30T15:46:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
