diff --git a/mqtt.py b/mqtt.py index ee5101a..cb6fcd7 100644 --- a/mqtt.py +++ b/mqtt.py @@ -405,6 +405,8 @@ async def handle_nodeinfo(self, msg): if 'role' in msg['payload']: node['role'] = msg['payload']['role'] + else: + node['role'] = 0 self.data.update_node(id, node) print(f"Node {id} added") diff --git a/templates/static/map.html.j2 b/templates/static/map.html.j2 index 624216c..fd5aa84 100644 --- a/templates/static/map.html.j2 +++ b/templates/static/map.html.j2 @@ -88,7 +88,8 @@ color: 'white', width: 2 }) - }) + }), + zIndex: 0 }); var offlineStyle = new ol.style.Style({ @@ -101,7 +102,8 @@ color: 'white', width: 2 }) - }) + }), + zIndex: 1 }); var onlineStyle = new ol.style.Style({ @@ -114,7 +116,8 @@ color: 'white', width: 2 }) - }) + }), + zIndex: 2 }); const nodes = {};