I have a working node-red-contrib-web-worldmap using the tracks node. I'm just looking for an elegant way to refresh the track when loading the map (essentially force the track node to output its currently held payload). Because the track node only sends output to the map when a point is sent to it, the map is empty when it first loads. I don't want to re-send points to the track node because I don't necessarily have a new position (the newest position is already stored in the track node). I don't want a duplicate point in the track.
If I re-send the last point with the same timestamp, will it replace that point or make a duplicate? Since the track node only outputs a line as an array of coordinates, it does not seem to reatin knowledge of the location timestamps. So it seems to me that any new point sent to the track node will create a duplicate.
It seems like there should be a simple way to trigger the track node to output its last payload without sending it new data.
If you resend the last point it will add another point but as it is in the same place no line will be drawn. I guess technically it will visually appear to reduce the overall length by 1 but I don’t think this matters too much unless you are only showing very few points in the trail.
That was my first thought and maybe what I will end up doing if there is no way to trigger a refresh. As you say, it was the last point "falling off" that I was trying to avoid. For my purposes, it will probably do, but it is not ideal. If you imagine even just a few users, every time the map reloads, the track is shortened by one. If the position update frequency is low and the map loading frequency is high, this could lead to the track shortening by a lot. An elegant solution would be to implement a way to trigger the node to output its currently stored line. Seems like it shouldn't be too hard. I would offer to contribute, but it would be my first time and likely not efficient.