Adjust map zoom levels for mobile devices

- Mobile portrait (< 480px): padding [50, 50] for wider view
- Mobile landscape (< 768px): padding [75, 75]
- Desktop: padding [100, 100]

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Louis King
2026-02-07 21:01:29 +00:00
parent 3d7ed53df3
commit 71859b2168

View File

@@ -141,8 +141,9 @@
const MAX_BOUNDS_RADIUS_KM = 20;
// Padding for fitBounds - more padding on mobile for tighter zoom
const isMobilePortrait = window.innerWidth < 480;
const isMobile = window.innerWidth < 768;
const BOUNDS_PADDING = isMobile ? [150, 150] : [100, 100];
const BOUNDS_PADDING = isMobilePortrait ? [50, 50] : (isMobile ? [75, 75] : [100, 100]);
// Calculate distance between two points in km (Haversine formula)
function getDistanceKm(lat1, lon1, lat2, lon2) {