mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
Added the traceroute and neighbours to the map
This commit is contained in:
@@ -191,6 +191,7 @@ document.querySelectorAll(".filter-checkbox").forEach(input => {
|
||||
input.addEventListener("change", updateMarkers);
|
||||
});
|
||||
|
||||
|
||||
// ---- Edges ----
|
||||
var edgeLayer = L.layerGroup().addTo(map);
|
||||
var edgesData = null;
|
||||
@@ -202,6 +203,8 @@ fetch('/api/edges')
|
||||
.then(data => { edgesData = data.edges; })
|
||||
.catch(err => console.error(err));
|
||||
|
||||
|
||||
|
||||
function onNodeClick(node) {
|
||||
// Toggle off if already selected
|
||||
if (selectedNodeId != node.id) {
|
||||
@@ -237,7 +240,7 @@ edgesData.forEach(edge => {
|
||||
.addTo(edgeLayer)
|
||||
.bringToFront(); // Force this line to be visible
|
||||
|
||||
console.log(`Edge type: ${edge.type} | From: ${fromNode.long_name} (${fromNode.lat},${fromNode.long}) -> To: ${toNode.long_name} (${toNode.lat},${toNode.long})`);
|
||||
console.log(`Edge type: To: ${toNode.long_name} (${toNode.lat},${toNode.long})`);
|
||||
});
|
||||
|
||||
// Bring all edges to top
|
||||
|
||||
Reference in New Issue
Block a user