fix(map): surface geolocation failures as a localized toast

This commit is contained in:
Maurice
2026-09-01 19:00:14 +02:00
committed by Maurice
parent cfe2b80a5d
commit 46a89e7a90
31 changed files with 249 additions and 8 deletions
+2 -1
View File
@@ -509,7 +509,7 @@ export function MapViewGL({
onViewportChangeRef.current = onViewportChange
const onMapReadyRef = useRef(onMapReady)
onMapReadyRef.current = onMapReady
const { position: userPosition, mode: trackingMode, error: trackingError, cycleMode: cycleTrackingMode, setMode: setTrackingMode } = useGeolocation()
const { position: userPosition, mode: trackingMode, error: trackingError, errorCode: trackingErrorCode, cycleMode: cycleTrackingMode, setMode: setTrackingMode } = useGeolocation()
const onClickRefs = useRef({ marker: onMarkerClick, map: onMapClick, context: onMapContextMenu })
onClickRefs.current.marker = onMarkerClick
onClickRefs.current.map = onMapClick
@@ -1548,6 +1548,7 @@ export function MapViewGL({
<LocationButton
mode={trackingMode}
error={trackingError}
errorCode={trackingErrorCode}
onClick={cycleTrackingMode}
bottomOffset={buttonBottom as unknown as number}
/>