erster einigermassen brauchbarer stand

This commit is contained in:
Joerg Lehmann 2021-03-19 20:44:09 +01:00
parent 842e48423b
commit 3cdfc5ea2e
1 changed files with 4 additions and 1 deletions

View File

@ -94,10 +94,13 @@ function refreshDatapoints(deveui, start, stop) {
var myhtml = '<p class="has-text-centered"><b>' + alias + '</b><br />' + moment(date).format('DD.MM.YYYY HH:mm') + '<br />' + vbat2icon(datapoints[datapoints.length - 1][4]) + '</p>';
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);