I'll build a comprehensive browser-based GIS disaster-response command center. Let me start by exploring the project structure.
Now I have a good understanding of the setup. Let me plan the architecture:
- Custom SVG-based pannable/zoomable vector map (no external map libs needed — everything must inline for singlefile build)
- Seeded synthetic data: incidents, shelters, routes, resources
- Layers: toggleable
- Clustering for incidents at low zoom
- Geofenced alerts — polygon zones triggering warnings
- Timeline replay slider
- Drag & drop resource dispatch
- Offline mode using localStorage
- Printable briefing view
- Rich sidebar UI
Let me build this in modular files:
Now let me create the map projection utilities and the main Map component:
Now let me create the icon system and the main MapCanvas component:
Now the main MapCanvas component - the heart of the app:
I had a syntax error and left the render placeholder. Let me rewrite it properly with the full render logic:
Now let me create the sidebar, timeline, briefing print view, and the main App:
Now let me create the DetailsPanel, Briefing print view, and main App:
Now the main App that ties everything together:
Let me fix the unused world param in Sidebar and add print styles:
Let me build and check for issues:
Build succeeded. Let me verify a few things by re-reading key logic to make sure runtime behavior is correct. Let me check my unused imports and unused var in MapCanvas:
Good — all used. The build passed. The application is complete. Let me summarize what was built:
ATLAS-7 · Disaster Response Command Center
I built a comprehensive browser-based GIS command center as a single-page React app. The build produced a self-contained 282 KB dist/index.html file (all inlined via vite-plugin-singlefile).
Architecture (7 modules)
-
src/data/seed.ts — Seeded PRNG (mulberry32) generates a reproducible synthetic world: 28 incidents (6 types × 5 severities), 8 shelters with supply levels, 32 field resources (engines, medics, rescue, police, air, logistics), 6 routes, 4 geofenced zones, and a 6-hour timeline with derived events. Includes haversine distance and point-in-polygon utilities.
-
src/map/projection.ts — Custom equirectangular projection with project/unproject/panBy/zoomAt helpers so the map pans, zooms, and anchors correctly around the cursor.
-
src/map/cluster.ts — Greedy screen-space clustering (only used when zoomed out; disables above z=13.5).
-
src/map/MapCanvas.tsx — Pure-SVG vector map with:
- Synthetic land polygon + water pattern + arterial/minor road network
- Toggleable lat/lng graticule, geofence polygons (evac / hazard / no-fly / flood-plain) with pulsing outlines
- Route arrows (evacuation, supply, blocked)
- Incident markers (severity-scaled rings, glyph per type, pulse for active)
- Resource markers with dispatch links to assigned incidents
- Drag-and-drop dispatch via
foreignObject HTML overlays on SVG (draggable resources, drop targets on incidents)
- Cluster bubbles that zoom in on click
- Live geofence-alert detection when a resource enters a hazard zone
- Compass rose, dynamic scale bar, live cursor coordinates, zoom controls
-
src/ui/Sidebar.tsx — Left rail with live KPIs, layer toggles (7 layers), incident-type chip filter, sortable incident list, draggable resource roster, and action buttons (offline mode, save/load state, print briefing).
-
src/ui/Timeline.tsx — Scrubbable playhead with color-coded event ticks, play/pause/reset, and 1×/30×/120×/600× speeds. Filters the map to reportedAt ≤ playhead for replay.
-
src/ui/DetailsPanel.tsx — Floating context panel showing incident/resource/shelter details, status toggles, "nearest available units" ranked by real distance, and inline drag-target for dispatch.
-
src/ui/Briefing.tsx — Full print-styled Situation Report with executive summary, KPI cards, breakdown tables, priority incidents, resource status, shelter network, active geofences, and timeline — all wired to window.print() with @page letter sizing.
Features delivered
✅ Pannable vector map · ✅ Layered incidents/shelters/routes/geofences · ✅ Geofenced alerts · ✅ Screen-space clustering · ✅ Timeline replay · ✅ Drag-and-drop dispatch (sidebar → map or map → map) · ✅ Offline mode (localStorage persistence) · ✅ Printable briefing · ✅ Rich seeded synthetic data · ✅ Keyboard shortcuts (Space, P, Esc)
Files built: index.html, src/data/seed.ts, src/map/projection.ts, src/map/cluster.ts, src/ui/icons.tsx, src/map/MapCanvas.tsx, src/ui/Sidebar.tsx, src/ui/Timeline.tsx, src/ui/DetailsPanel.tsx, src/ui/Briefing.tsx, src/App.tsx, src/index.css