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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user