Displaying lines/area on a world map

Morning.

I am looking for some assistance with the worldmap.

I have a machine that moves in a circle and then gets displayed on the world map as it moves with a line from the center. The coordinates gets sent about every 5 minutes. Right now it looks like this.

What I want to do now is to keep track of where it moved and if here was errors. So basically it will display something like this. Where light blue is where it moved and during the orange part there was errors and then it moved again without errors. And then also clear the markers when it reaches the start point.

This was quickly done in paint now. On node red I am now using a counter and drawing a new line every time the coordinates change and also saving that in a text file incase node red reboots to easily load all those lines again.

Is there an easier or better way of doing it?

And how to track if it has completed 1 rotation in order to clear it.

Regards

Marius

I forgot, I would also like to determine if it is moving clockwise or anti-clockwise.

Thanks

Tricky one. you can use the Arc capability to draw an area - GitHub - dceejay/RedMap: A web map app for Node-RED to put blobs on - but you would need to keep track of when you went from good to bad and draw new points at the same location every time the colour changed. Also the arc is based on an angle and “field of view” so you would need to do some maths - angle would be (start angle + end angle)/2 and FOV would be (end angle - start angle)