aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/layout
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/app/components/layout')
-rw-r--r--src/frontend/app/components/layout/NavBar.tsx19
1 files changed, 1 insertions, 18 deletions
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");
},
() => {},
{