i am receiving an array of points with lat and lon locations from a database, and i am able to plot them on the worldmap, my problem is the following:
1- my query perform an update using a time interval (every 3 Sec), and every time my query runs an update it receive a different array of points, as some new points are added and some points are no longer valid and are required to be deleted/removed from the worldmap.
2- the map adds the new points with no problem however it does not deleted/remove the invalid ones on its own.
3- i tried the solution to clear the layer that contains the markers by using (msg.payload.command.clear = name of the layer) before i update the map with the updated result of my query, however this has resulted an annoying blink on the map before each update.
4- i tried to use the "differences" node to add the new points and delete the invalid one, however i have encountered another issue, the "deleted" function that i found on the node page does not perform anything and hence i am not able to delete the points that i need to remove from the map.
5- the TTL function is not an option for me as it uses a time and i need something near real time and without a blink.
is there is any way where i can perform an update on the map that will add the valid points (the result of my query) and delete the ones that are invalid (not in the result of my query) without having this annoying blink that is the result of the msg.payload.command.clear function??
sorry for the long problem description and thanks in advance.