diff --git a/meshview/templates/packet_details.html b/meshview/templates/packet_details.html
index 1c7e26b..021aef5 100644
--- a/meshview/templates/packet_details.html
+++ b/meshview/templates/packet_details.html
@@ -45,15 +45,13 @@
attribution: '© OpenStreetMap'
}).addTo(details_map);
- // Function to calculate distance in miles
function getDistanceInMiles(latlng1, latlng2) {
- var meters = latlng1.distanceTo(latlng2); // Get distance in meters
- return meters * 0.000621371; // Convert meters to miles
+ var meters = latlng1.distanceTo(latlng2);
+ return meters * 0.000621371;
}
{% if from_node_cord %}
var fromNodeLatLng = L.latLng({{ from_node_cord | tojson }});
-
var fromNode = L.circleMarker(fromNodeLatLng, {
radius: 10,
color: 'red',
@@ -62,7 +60,6 @@
fillOpacity: .4
}).addTo(markers);
- // Add tooltip for the from_node_cord
fromNode.bindPopup(`
Sent by: {{node.long_name}}
Short: {{node.short_name}}
@@ -75,58 +72,40 @@
{% endif %}
{% for u in uplinked_nodes %}
- var uplinkNodeLatLng = L.latLng([{{ u.lat }}, {{ u.long }}]);
+ var uplinkNodeLatLng = L.latLng([{{ u.lat }}, {{ u.long }}]);
- // Calculate distance in miles
- var distanceMiles = getDistanceInMiles(fromNodeLatLng, uplinkNodeLatLng).toFixed(1);
+ {% if from_node_cord %}
+ var distanceMiles = getDistanceInMiles(fromNodeLatLng, uplinkNodeLatLng).toFixed(1);
+ {% endif %}
-/*
- var node = L.circleMarker(uplinkNodeLatLng, {
- radius: 6,
- color: 'blue',
- weight: 1,
- fillColor: 'blue',
- fillOpacity: 0.4
- }).addTo(markers);
-*/
-
- var node = L.marker(uplinkNodeLatLng, {
- icon: L.divIcon({
- className: 'text-icon', // Custom class for styling
- html: '