From ffb8ee87898bffe5fee706abb047133585bb5d0d Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Fri, 12 Dec 2025 18:23:46 +0100
Subject: feat: enhance OTP service logic, improve planner overlay, and update
 NavBar styles

---
 src/frontend/app/routes/map.tsx | 30 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)

(limited to 'src/frontend/app/routes/map.tsx')

diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx
index 3d59efb..39fc062 100644
--- a/src/frontend/app/routes/map.tsx
+++ b/src/frontend/app/routes/map.tsx
@@ -45,38 +45,11 @@ export default function StopMap() {
   const { mapState, updateMapState, theme } = useApp();
   const mapRef = useRef<MapRef>(null);
 
-  const { searchRoute, origin, setOrigin } = usePlanner();
+  const { searchRoute } = usePlanner();
 
   // Style state for Map component
   const [mapStyle, setMapStyle] = useState<StyleSpecification>(DEFAULT_STYLE);
 
-  // Set default origin to current location on first load (map page)
-  useEffect(() => {
-    // On the map page, always default to current location on load,
-    // overriding any previously used address. The user can change it after.
-    if (!navigator.geolocation) return;
-    navigator.geolocation.getCurrentPosition(
-      async (pos) => {
-        try {
-          // Keep display as "Current location" until a search is performed
-          setOrigin({
-            name: t("planner.current_location"),
-            label: "GPS",
-            lat: pos.coords.latitude,
-            lon: pos.coords.longitude,
-            layer: "current-location",
-          });
-        } catch (_) {
-          // ignore
-        }
-      },
-      () => {
-        // ignore geolocation errors; user can set origin manually
-      },
-      { enableHighAccuracy: true, timeout: 10000 }
-    );
-  }, [setOrigin, t]);
-
   // Handle click events on clusters and individual stops
   const onMapClick = (e: MapLayerMouseEvent) => {
     const features = e.features;
@@ -222,6 +195,7 @@ export default function StopMap() {
         onNavigateToPlanner={() => navigate("/planner")}
         clearPickerOnOpen={true}
         showLastDestinationWhenCollapsed={false}
+        cardBackground="bg-white/95 dark:bg-slate-900/90"
       />
 
       <Map
-- 
cgit v1.3

