diff --git a/src/public/index.html b/src/public/index.html index e4b3929..e0a7e38 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -621,6 +621,16 @@
+ +
+
+ + + +
+
This node has not reported a position.
+
+
@@ -2400,6 +2410,9 @@ findNodeById: function(id) { return window.findNodeById(id); }, + findNodeMarkerById: function(id) { + return window.findNodeMarkerById(id); + }, onSearchResultNodeClick: function(node) { // clear search @@ -2868,7 +2881,6 @@ // find node marker by id var nodeMarker = findNodeMarkerById(id); if(!nodeMarker){ - alert("Could not find a position for node: " + id); return false; } @@ -2900,7 +2912,15 @@ if(nodes.length > 0){ const randomNode = nodes[Math.floor(Math.random() * nodes.length)]; if(randomNode){ - goToNode(randomNode.node_id); + + // go to node + if(window.goToNode(randomNode.node_id)){ + return; + } + + // fallback to showing node details since we can't go to the node + window.showNodeDetails(randomNode.node_id); + } } }