OpenDataVisualizer/client/src/App.tsx
Claudio Schaad 39a1cd4009 Add combined Thurgau map with switchable layers
- One shared Leaflet map (MapHost) with the traffic, watercraft and
  vehicle maps turned into layer components that attach to it and clean
  up on unmount; each layer adds its own data credit
- Data loading and per-dataset state moved into hooks used by both the
  single pages and the combined page
- /karte/thurgau: layer panel with on/off switch, controls and legend per
  dataset, shared year controls for the yearly layers, traffic day/time
  controls, layers and year in the URL
- Side panel shows the selected municipality, harbour or station, or an
  overview of all active layers; the municipality panel lists the
  counting stations and harbours in that municipality
- Start page shows only the combined map; single maps are linked from
  the layer cards
- Docs: combined map in docs/datasets.md and CLAUDE.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 20:04:50 +01:00

19 lines
857 B
TypeScript

import { Navigate, Route, Routes } from 'react-router-dom';
import { HomePage } from './pages/HomePage';
import { ThurgauCombinedPage } from './pages/ThurgauCombinedPage';
import { TrafficThurgauPage } from './pages/TrafficThurgauPage';
import { VehiclesThurgauPage } from './pages/VehiclesThurgauPage';
import { WatercraftThurgauPage } from './pages/WatercraftThurgauPage';
export function App() {
return (
<Routes>
<Route path="/" element={<HomePage />} />
<Route path="/verkehr/thurgau" element={<TrafficThurgauPage />} />
<Route path="/schifffahrt/thurgau" element={<WatercraftThurgauPage />} />
<Route path="/fahrzeuge/thurgau" element={<VehiclesThurgauPage />} />
<Route path="/karte/thurgau" element={<ThurgauCombinedPage />} />
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
);
}