From 56c2e739d95dd7b64a7332e2320579925c1751a9 Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Fri, 13 Mar 2026 10:09:30 +0100
Subject: Refactor geolocation settings across components; improve accuracy and
 timeout configurations

---
 src/frontend/app/components/layout/NavBar.tsx | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

(limited to 'src/frontend/app/components/layout/NavBar.tsx')

diff --git a/src/frontend/app/components/layout/NavBar.tsx b/src/frontend/app/components/layout/NavBar.tsx
index 57e2f9d..5822ce7 100644
--- a/src/frontend/app/components/layout/NavBar.tsx
+++ b/src/frontend/app/components/layout/NavBar.tsx
@@ -6,21 +6,6 @@ import { usePlanner } from "~/hooks/usePlanner";
 import { useApp } from "../../AppContext";
 import styles from "./NavBar.module.css";
 
-// Helper: check if coordinates are within Vigo bounds
-function isWithinVigo(lngLat: LngLatLike): boolean {
-  let lng: number, lat: number;
-  if (Array.isArray(lngLat)) {
-    [lng, lat] = lngLat;
-  } else if ("lng" in lngLat && "lat" in lngLat) {
-    lng = lngLat.lng;
-    lat = lngLat.lat;
-  } else {
-    return false;
-  }
-  // Rough bounding box for Vigo
-  return lat >= 42.18 && lat <= 42.3 && lng >= -8.78 && lng <= -8.65;
-}
-
 interface NavBarProps {
   orientation?: "horizontal" | "vertical";
 }
@@ -56,9 +41,7 @@ export default function NavBar({ orientation = "horizontal" }: NavBarProps) {
           (position) => {
             const { latitude, longitude } = position.coords;
             const coords: LngLatLike = [latitude, longitude];
-            if (isWithinVigo(coords)) {
-              updateMapState(coords, 16);
-            }
+            updateMapState(coords, 16, "gps");
           },
           () => {},
           {
-- 
cgit v1.3

