rename connections layer group
This commit is contained in:
@ -267,7 +267,7 @@
|
||||
|
||||
// create layer groups
|
||||
var nodesLayerGroup = new L.LayerGroup();
|
||||
var connectionsLayerGroup = new L.LayerGroup();
|
||||
var neighboursLayerGroup = new L.LayerGroup();
|
||||
|
||||
// create icons
|
||||
var iconOnline = L.divIcon({ className: 'icon-online'});
|
||||
@ -289,7 +289,7 @@
|
||||
|
||||
var overlays = {
|
||||
"Nodes": nodesLayerGroup,
|
||||
"Connections": connectionsLayerGroup,
|
||||
"Neighbours": neighboursLayerGroup,
|
||||
};
|
||||
|
||||
// add layers to control ui
|
||||
@ -297,7 +297,7 @@
|
||||
|
||||
// add layers to map that should be enabled by default
|
||||
nodesLayerGroup.addTo(map);
|
||||
connectionsLayerGroup.addTo(map);
|
||||
neighboursLayerGroup.addTo(map);
|
||||
legend.addTo(map);
|
||||
|
||||
// remove outline when map clicked
|
||||
@ -432,8 +432,8 @@
|
||||
nodesLayerGroup.clearLayers();
|
||||
}
|
||||
|
||||
function clearAllConnections() {
|
||||
connectionsLayerGroup.clearLayers();
|
||||
function clearAllNeighbours() {
|
||||
neighboursLayerGroup.clearLayers();
|
||||
}
|
||||
|
||||
function closeAllPopups() {
|
||||
@ -481,7 +481,7 @@
|
||||
closeAllPopups();
|
||||
closeAllTooltips();
|
||||
clearAllNodes();
|
||||
clearAllConnections();
|
||||
clearAllNeighbours();
|
||||
clearNodeOutline();
|
||||
}
|
||||
|
||||
@ -581,7 +581,7 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
// add node connections
|
||||
// add node neighbours
|
||||
const neighbours = node.neighbour_info?.neighbours ?? [];
|
||||
console.log(neighbours);
|
||||
for(const neighbour of neighbours){
|
||||
@ -605,7 +605,7 @@
|
||||
], {
|
||||
color: '#2563eb',
|
||||
opacity: 0.5,
|
||||
}).addTo(connectionsLayerGroup);
|
||||
}).addTo(neighboursLayerGroup);
|
||||
|
||||
const tooltip = `<b>${node.long_name}</b> heard <b>${neighbourNode.long_name}</b>`
|
||||
+ `<br/>SNR: ${neighbour.snr}dB`
|
||||
|
Reference in New Issue
Block a user