Add layergroup for LongFast

This commit is contained in:
Anton Roslund 2025-09-28 20:26:19 +02:00
parent 9eae1d21b6
commit 998259042b

View file

@ -2745,6 +2745,7 @@
}); });
var nodesBackboneLayerGroup = new L.LayerGroup(); var nodesBackboneLayerGroup = new L.LayerGroup();
var nodesMediumFastLayerGroup = new L.LayerGroup(); var nodesMediumFastLayerGroup = new L.LayerGroup();
var nodesLongFastLayerGroup = new L.LayerGroup();
var waypointsLayerGroup = new L.LayerGroup(); var waypointsLayerGroup = new L.LayerGroup();
var nodePositionHistoryLayerGroup = new L.LayerGroup(); var nodePositionHistoryLayerGroup = new L.LayerGroup();
var traceroutesLayerGroup = new L.LayerGroup(); var traceroutesLayerGroup = new L.LayerGroup();
@ -2788,8 +2789,8 @@
div.style.backgroundColor = 'white'; div.style.backgroundColor = 'white';
div.style.padding = '12px'; div.style.padding = '12px';
div.innerHTML = `<div style="margin-bottom:6px;"><strong>Legend</strong></div>` div.innerHTML = `<div style="margin-bottom:6px;"><strong>Legend</strong></div>`
+ `<div style="display:flex"><div class="icon-mediumfast" style="width:12px;height:12px;margin-right:4px;margin-top:auto;margin-bottom:auto;"></div> Medium Fast</div>` + `<div style="display:flex"><div class="icon-mediumfast" style="width:12px;height:12px;margin-right:4px;margin-top:auto;margin-bottom:auto;"></div> MediumFast</div>`
+ `<div style="display:flex"><div class="icon-longfast" style="width:12px;height:12px;margin-right:4px;margin-top:auto;margin-bottom:auto;"></div> Long Fast</div>` + `<div style="display:flex"><div class="icon-longfast" style="width:12px;height:12px;margin-right:4px;margin-top:auto;margin-bottom:auto;"></div> LongFast</div>`
+ `<div style="display:flex"><div class="icon-offline" style="width:12px;height:12px;margin-right:4px;margin-top:auto;margin-bottom:auto;"></div> Offline Too Long</div>`; + `<div style="display:flex"><div class="icon-offline" style="width:12px;height:12px;margin-right:4px;margin-top:auto;margin-bottom:auto;"></div> Offline Too Long</div>`;
return div; return div;
}; };
@ -2816,7 +2817,8 @@
"All": nodesLayerGroup, "All": nodesLayerGroup,
"Routers": nodesRouterLayerGroup, "Routers": nodesRouterLayerGroup,
"Backbone": nodesBackboneLayerGroup, "Backbone": nodesBackboneLayerGroup,
"Medium Fast": nodesMediumFastLayerGroup, "MediumFast": nodesMediumFastLayerGroup,
"LongFast": nodesLongFastLayerGroup,
"Clustered": nodesClusteredLayerGroup, "Clustered": nodesClusteredLayerGroup,
"None": new L.LayerGroup(), "None": new L.LayerGroup(),
}, },
@ -2997,6 +2999,7 @@
nodesRouterLayerGroup.clearLayers(); nodesRouterLayerGroup.clearLayers();
nodesBackboneLayerGroup.clearLayers(); nodesBackboneLayerGroup.clearLayers();
nodesMediumFastLayerGroup.clearLayers(); nodesMediumFastLayerGroup.clearLayers();
nodesLongFastLayerGroup.clearLayers();
} }
function clearAllNeighbours() { function clearAllNeighbours() {
@ -3597,6 +3600,11 @@
nodesMediumFastLayerGroup.addLayer(marker); nodesMediumFastLayerGroup.addLayer(marker);
} }
// add markers for LongFast channel to layer group
if(node.channel_id == "LongFast") {
nodesLongFastLayerGroup.addLayer(marker);
}
// show tooltip on desktop only // show tooltip on desktop only
if(!isMobile()){ if(!isMobile()){
marker.bindTooltip(getTooltipContentForNode(node), { marker.bindTooltip(getTooltipContentForNode(node), {