feat: add water quality markers to map

- Add 38 Irish beach water quality markers to map display
- Create water quality marker icons with color-coded status (excellent=green, good=blue, sufficient=amber, poor=red)
- Add water quality toggle in map filters
- Display beach name, status, and last sampled date in popups
- Create irishBeaches.ts data file with all beach locations
- Water quality markers shown by default, can be toggled off

Beaches covered: Dublin, Wicklow, Wexford, Waterford, Cork, Kerry, Clare, Galway, Mayo, Sligo, Donegal, Antrim, Down
This commit is contained in:
2025-11-16 23:40:37 +00:00
parent 9e5eadec82
commit 11c9333c73
4 changed files with 243 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import { ReportDetailModal } from '@/components/report';
import { analyticsService } from '@/services/analyticsService';
import { reportService } from '@/services/reportService';
import { eventService } from '@/services/eventService';
import { IRISH_BEACHES } from '@/data/irishBeaches';
import type { Report, FilterState, HotspotWithSeverity, CleanupEvent, ReportResponseDTO } from '@/types';
/**
@@ -20,6 +21,7 @@ export function MapPage() {
const [showHeatmap, setShowHeatmap] = useState(false);
const [showHotspots, setShowHotspots] = useState(false);
const [showEvents, setShowEvents] = useState(true);
const [showWaterQuality, setShowWaterQuality] = useState(true);
const [hotspots, setHotspots] = useState<HotspotWithSeverity[]>([]);
const [isLoadingHotspots, setIsLoadingHotspots] = useState(false);
const [reports, setReports] = useState<Report[]>([]);
@@ -452,10 +454,12 @@ export function MapPage() {
reports={reports}
events={showEvents ? events : []}
hotspots={hotspots}
waterQuality={IRISH_BEACHES}
filters={filters}
showClusters={showClusters}
showHeatmap={showHeatmap}
showHotspots={showHotspots}
showWaterQuality={showWaterQuality}
onMarkerClick={handleMarkerClick}
onMapClick={handleMapClick}
/>
@@ -473,6 +477,8 @@ export function MapPage() {
onToggleHotspots={handleToggleHotspots}
showHotspots={showHotspots}
isLoadingHotspots={isLoadingHotspots}
onToggleWaterQuality={() => setShowWaterQuality(!showWaterQuality)}
showWaterQuality={showWaterQuality}
/>
</div>
</div>