Added the traceroute and neighbours to the map

This commit is contained in:
Pablo Revilla
2025-08-29 09:28:35 -07:00
parent 396d919df3
commit 6836d42fd6

View File

@@ -110,9 +110,23 @@ const nodeMap = new Map();
nodes.forEach(n => nodeMap.set(n.id, n));
function isInvalidCoord(node) {
return (!node || node.lat == null || node.long == null || node.lat == 0 || node.long == 0);
if (!node) return true;
let { lat, long } = node;
// Remove decimal places (round to nearest integer)
lat = Math.round(lat);
long = Math.round(long);
return (
lat === null || long === null ||
lat === undefined || long === undefined ||
lat === 0 || long === 0 ||
Number.isNaN(lat) || Number.isNaN(long)
);
}
// ---- Marker Plotting ----
var bounds = L.latLngBounds();
var channels = new Set();