@@ -146,6 +140,10 @@
// Maximum radius (km) from anchor point for bounds calculation
const MAX_BOUNDS_RADIUS_KM = 20;
+ // Padding for fitBounds - more padding on mobile for tighter zoom
+ const isMobile = window.innerWidth < 768;
+ const BOUNDS_PADDING = isMobile ? [150, 150] : [100, 100];
+
// Calculate distance between two points in km (Haversine formula)
function getDistanceKm(lat1, lon1, lat2, lon2) {
const R = 6371; // Earth's radius in km
@@ -185,15 +183,6 @@
// formatRelativeTime is provided by /static/js/utils.js
- // Get emoji marker based on node type
- function getNodeEmoji(node) {
- const type = normalizeType(node.adv_type);
- if (type === 'chat') return '💬';
- if (type === 'repeater') return '📡';
- if (type === 'room') return '🪧';
- return '📍';
- }
-
// Get display name for node type
function getTypeDisplay(node) {
const type = normalizeType(node.adv_type);
@@ -209,13 +198,12 @@
const relativeTime = formatRelativeTime(node.last_seen);
const timeDisplay = relativeTime ? ` (${relativeTime})` : '';
- // Use logo for infrastructure nodes, emoji for others
+ // Use logo for infrastructure nodes, blue circle for others
let iconHtml;
if (node.is_infra) {
iconHtml = ``;
} else {
- const emoji = getNodeEmoji(node);
- iconHtml = `${emoji}`;
+ iconHtml = ``;
}
return L.divIcon({
@@ -246,10 +234,10 @@
const typeDisplay = getTypeDisplay(node);
- // Use logo for infrastructure nodes, emoji for others
+ // Use logo for infrastructure nodes, blue circle for others
const iconHtml = node.is_infra
? ``
- : getNodeEmoji(node);
+ : ``;
return `