From 3cdfc5ea2e206b8a6b01bf7a5a0b22117c9963aa Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Fri, 19 Mar 2021 20:44:09 +0100 Subject: [PATCH] erster einigermassen brauchbarer stand --- static/js/map.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/map.js b/static/js/map.js index ad60bf3..f62aeb8 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -94,10 +94,13 @@ function refreshDatapoints(deveui, start, stop) { var myhtml = '

' + alias + '
' + moment(date).format('DD.MM.YYYY HH:mm') + '
' + vbat2icon(datapoints[datapoints.length - 1][4]) + '

'; marker.bindPopup(myhtml).openPopup(); + if (allmarkers !== undefined) { + map.removeLayer(allmarkers); + } + markers = []; // we create the layer group with all positions - var myIcon = L.divIcon({className: 'my-div-icon'}); for (let i of datapoints) { unix_timestamp = i[0]; date = new Date(unix_timestamp * 1000);