place red marker above the orange ones

This commit is contained in:
Joerg Lehmann 2021-06-07 20:48:06 +02:00
parent 9db4ae08f3
commit c173fb653f
1 changed files with 1 additions and 2 deletions

View File

@ -111,7 +111,7 @@ function refreshDatapoints(deveui, start, stop) {
for (let i of datapoints) {
unix_timestamp = i[0];
date = new Date(unix_timestamp * 1000);
markers.push(L.marker([i[1], i[2]], { icon: woBischIcon2, zIndexOffset: 1000 }).bindPopup(moment(date).format('DD.MM.YYYY HH:mm')));
markers.push(L.marker([i[1], i[2]], { icon: woBischIcon2, zIndexOffset: 500 }).bindPopup(moment(date).format('DD.MM.YYYY HH:mm')));
lat = i[1];
lon = i[2];
}
@ -247,7 +247,6 @@ $(document).ready(function () {
var tilelayer = new L.tileLayer(url);
map.attributionControl.setPrefix('Source: Swiss Federal Office of Topography')
map.addLayer(tilelayer);
//marker = L.marker([lat, lon], { icon: woBischIcon, zIndexOffset: 1000 }).addTo(map);
$('#reportrange span').html(moment(s_start).locale('de').format('D. MMM YYYY') + ' - ' + moment(s_stop).locale('de').format('D. MMM YYYY'));