mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
Add long name to neighbors tooltip.
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
L.marker(trace[0]).addTo(map);
|
||||
{% for n in neighbors %}
|
||||
var m = L.circleMarker({{n.location | tojson}});
|
||||
m.bindPopup('SNR: {{n.snr}}<br/><a href="/packet_list/{{n.node_id}}">{{n.node_id | node_id_to_hex}}</a>');
|
||||
m.bindPopup('SNR: {{n.snr}}<br/><a href="/packet_list/{{n.node_id}}">{{n.name}} {{n.node_id | node_id_to_hex}}</a>');
|
||||
m.addTo(map);
|
||||
L.polyline([trace[0], {{n.location | tojson}}], {color: 'red'}).addTo(map);
|
||||
{% endfor %}
|
||||
|
||||
@@ -52,6 +52,7 @@ async def build_neighbors(node_id):
|
||||
|
||||
for node in [n.result() for n in neighbors]:
|
||||
if node.last_lat and node.last_long:
|
||||
results[node.node_id]['name'] = node.long_name
|
||||
results[node.node_id]['location'] = (node.last_lat * 1e-7, node.last_long * 1e-7)
|
||||
else:
|
||||
del results[node.node_id]
|
||||
|
||||
Reference in New Issue
Block a user