fix: disable all map options by default except clustered markers

- Set showEvents to false by default
- Set showWaterQuality to false by default
- Set showHeatmap to false by default (already was)
- Set showHotspots to false by default (already was)
- Keep showClusters as true (only enabled option)

Users can now enable features as needed via map filters
This commit is contained in:
2025-11-16 23:41:58 +00:00
parent 11c9333c73
commit fd3740391e
3 changed files with 5 additions and 5 deletions

View File

@@ -28,9 +28,9 @@ export function MapFilters({
showHotspots = false, showHotspots = false,
isLoadingHotspots = false, isLoadingHotspots = false,
onToggleEvents, onToggleEvents,
showEvents = true, showEvents = false,
onToggleWaterQuality, onToggleWaterQuality,
showWaterQuality = true, showWaterQuality = false,
}: MapFiltersProps) { }: MapFiltersProps) {
const [isExpanded, setIsExpanded] = useState(true); const [isExpanded, setIsExpanded] = useState(true);

View File

@@ -54,7 +54,7 @@ export function MapView({
showClusters = true, showClusters = true,
showHeatmap = false, showHeatmap = false,
showHotspots = false, showHotspots = false,
showWaterQuality = true, showWaterQuality = false,
center = [53.4, -9.0], // Centered on Ireland, minimizing UK visibility center = [53.4, -9.0], // Centered on Ireland, minimizing UK visibility
zoom = 7, zoom = 7,
}: MapViewProps) { }: MapViewProps) {

View File

@@ -20,8 +20,8 @@ export function MapPage() {
const [showClusters, setShowClusters] = useState(true); const [showClusters, setShowClusters] = useState(true);
const [showHeatmap, setShowHeatmap] = useState(false); const [showHeatmap, setShowHeatmap] = useState(false);
const [showHotspots, setShowHotspots] = useState(false); const [showHotspots, setShowHotspots] = useState(false);
const [showEvents, setShowEvents] = useState(true); const [showEvents, setShowEvents] = useState(false);
const [showWaterQuality, setShowWaterQuality] = useState(true); const [showWaterQuality, setShowWaterQuality] = useState(false);
const [hotspots, setHotspots] = useState<HotspotWithSeverity[]>([]); const [hotspots, setHotspots] = useState<HotspotWithSeverity[]>([]);
const [isLoadingHotspots, setIsLoadingHotspots] = useState(false); const [isLoadingHotspots, setIsLoadingHotspots] = useState(false);
const [reports, setReports] = useState<Report[]>([]); const [reports, setReports] = useState<Report[]>([]);