From 3ca73ae978255f8351bee5273a5b53a5bb8d6d40 Mon Sep 17 00:00:00 2001 From: Daniel Pupius Date: Mon, 16 Mar 2026 00:08:11 +0000 Subject: [PATCH] NodeLocationMap: reduce default zoom by 1, add navigation controls Co-Authored-By: Claude Sonnet 4.6 --- web/src/components/dashboard/GoogleMap.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/components/dashboard/GoogleMap.tsx b/web/src/components/dashboard/GoogleMap.tsx index 5f591d0..57b2bf4 100644 --- a/web/src/components/dashboard/GoogleMap.tsx +++ b/web/src/components/dashboard/GoogleMap.tsx @@ -33,7 +33,7 @@ export const NodeLocationMap: React.FC = ({ const mapRef = useRef(null); const accuracyMeters = calculateAccuracyFromPrecisionBits(precisionBits); - const effectiveZoom = zoom ?? calculateZoomFromAccuracy(accuracyMeters); + const effectiveZoom = zoom ?? Math.max(1, calculateZoomFromAccuracy(accuracyMeters) - 1); const markerGeoJSON = useMemo((): FeatureCollection => ({ type: "FeatureCollection", @@ -62,6 +62,7 @@ export const NodeLocationMap: React.FC = ({ }); map.addControl(new maplibregl.AttributionControl({ compact: true })); + map.addControl(new maplibregl.NavigationControl(), 'top-left'); map.on("load", () => { map.addSource("circle", { type: "geojson", data: circleGeoJSON });