diff --git a/client/src/pages/MapView.jsx b/client/src/pages/MapView.jsx index 1092976..88c1248 100644 --- a/client/src/pages/MapView.jsx +++ b/client/src/pages/MapView.jsx @@ -209,7 +209,6 @@ const MapView = () => { const centerLat = (minLat + maxLat) / 2; const centerLon = (minLon + maxLon) / 2; setMapCenter([centerLat, centerLon]); - setIsInitialLoad(false); // Mark that initial load is complete // Disable bounds fitting after a short delay to allow initial fit setTimeout(() => { @@ -217,6 +216,11 @@ const MapView = () => { }, 1000); } } + + // Always mark initial load as complete after first fetch, regardless of device data + if (isInitialLoad) { + setIsInitialLoad(false); + } } catch (error) { console.error('Error fetching devices:', error); } finally {