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