Overview
The Dashboard Backus interactive map provides a satellite view of the patio facility with overlay interfaces for all operational bays. The map serves as the primary workspace where operators manage truck assignments and monitor loading/unloading operations in real-time.Map Architecture
The map system is built with the following components:Map Features
Satellite Background
The map uses a high-resolution satellite image (patio.png) of the actual facility, providing operators with a familiar view that matches the physical layout.
Image Filters:
- Dark Mode:
brightness(0.60) saturate(0.9)β reduces brightness for night shifts - Light Mode:
brightness(0.85) saturate(1.1)β enhances visibility for day shifts - Help Mode: Slightly increases brightness to highlight interactive areas
Bay Positioning
Each bay is positioned using percentage-based coordinates that map to the satellite image. This ensures accurate placement regardless of screen size.The coordinate system is based on a 1061Γ580px reference frame. Positions are calculated as percentages to maintain accuracy across different screen resolutions.
Dark/Light Mode Toggle
The map adapts to operator preference with seamless dark/light mode transitions:- Dark Mode: Reduces eye strain during night shifts (23:01β06:59)
- Light Mode: Improves visibility in well-lit control rooms
- Smooth Transitions: 0.6s CSS transitions prevent jarring changes
Help Mode
Help mode provides visual guidance by highlighting compatible bays when dragging a truck:Responsive Design
The map usesclamp() CSS functions to scale proportionally across screen sizes:
Real-Time Data Updates
The map polls Supabase every 10 seconds to fetch trucks in queue:Toast Notifications
The map displays contextual notifications for all operations:- Success (green): Truck assignments, incident closures, successful exits
- Error (red): Validation failures, database errors, incompatible assignments
- Info (gray): Bay transfers, configuration changes, general updates
Screenshot Reference
Map View Example
The interactive map shows:
- Satellite imagery of the patio facility
- 10 bay overlays positioned at real-world coordinates
- Truck queue at the bottom with 5-column grid layout
- 3 floating panels with real-time statistics
- Traffic light legend in bottom-right corner
- Toast notifications in bottom-left corner
Performance Considerations
- Image Optimization: Use WebP format for the satellite image to reduce load time
- Polling Throttle: 10-second intervals balance freshness with server load
- CSS Transitions: Hardware-accelerated transforms prevent UI jank
- Memoization: React callbacks wrapped in
useCallbackto prevent re-renders
Related Features
Drag and Drop
Learn how to assign trucks to bays using drag-and-drop
Dashboard Panels
Explore the real-time statistics overlays
