diff --git a/src/mapper/src/lib/components/map/geolocation.svelte b/src/mapper/src/lib/components/map/geolocation.svelte index af545029b..7fdc3ef67 100644 --- a/src/mapper/src/lib/components/map/geolocation.svelte +++ b/src/mapper/src/lib/components/map/geolocation.svelte @@ -25,6 +25,7 @@ let watchId: number | undefined = $state(); let directions: MapLibreGlDirections = $state(); let entityDistance: number = $state(0); + let tooltipRef: any = $state(); const entityToNavigate = $derived(entitiesStore.entityToNavigate); @@ -206,20 +207,43 @@ - { - entitiesStore.setToggleGeolocation(!entitiesStore.toggleGeolocation); - if (!entitiesStore.toggleGeolocation) { - exitNavigationMode(); - } + tooltipRef.hide()} + onkeydown={(e: KeyboardEvent) => { + e.key === 'Enter' && tooltipRef.hide(); }} - > - +
+ For the best experience, turn on location + +
+ { + entitiesStore.setToggleGeolocation(!entitiesStore.toggleGeolocation); + if (!entitiesStore.toggleGeolocation) { + exitNavigationMode(); + } + }} + > + + + + + {#if entitiesStore.toggleGeolocation}