From 6836d42fd633f44fc0cb99ab6130972f514c38ec Mon Sep 17 00:00:00 2001 From: Pablo Revilla Date: Fri, 29 Aug 2025 09:28:35 -0700 Subject: [PATCH] Added the traceroute and neighbours to the map --- meshview/templates/map.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/meshview/templates/map.html b/meshview/templates/map.html index 381c047..fa7d7c0 100644 --- a/meshview/templates/map.html +++ b/meshview/templates/map.html @@ -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();