aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-12-25 02:10:25 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-12-25 02:10:25 +0100
commit843cfb208849d652da16e943247057cf5a251254 (patch)
treefc082f90ec7872c293aca5f9dc2dc998ff66d69d /src/frontend
parent800fd816132c38617b2cc16f4eecf95f38d09841 (diff)
Fix shit with map
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/app/components/shared/AppMap.tsx4
-rw-r--r--src/frontend/app/root.css9
-rw-r--r--src/frontend/app/routes/map.tsx10
-rw-r--r--src/frontend/public/maps/spritesheet/sprite.json8
-rw-r--r--src/frontend/public/maps/spritesheet/sprite.pngbin4817 -> 6134 bytes
-rw-r--r--src/frontend/public/maps/spritesheet/sprite@2x.json8
-rw-r--r--src/frontend/public/maps/spritesheet/sprite@2x.pngbin11003 -> 13742 bytes
7 files changed, 27 insertions, 12 deletions
diff --git a/src/frontend/app/components/shared/AppMap.tsx b/src/frontend/app/components/shared/AppMap.tsx
index adf860d..2c8d097 100644
--- a/src/frontend/app/components/shared/AppMap.tsx
+++ b/src/frontend/app/components/shared/AppMap.tsx
@@ -144,7 +144,7 @@ export const AppMap = forwardRef<MapRef, AppMapProps>(
}
}
};
- }, [syncState, updateMapState]);
+ }, [mapPositionMode, mapRef.current, updateMapState]);
const getLatitude = (center: any) =>
Array.isArray(center) ? center[0] : center.lat;
@@ -181,7 +181,7 @@ export const AppMap = forwardRef<MapRef, AppMapProps>(
return (
<Map
ref={mapRef}
- mapLib={maplibregl as any}
+ mapLib={maplibregl}
mapStyle={mapStyle}
style={{ width: "100%", height: "100%", ...style }}
initialViewState={viewState}
diff --git a/src/frontend/app/root.css b/src/frontend/app/root.css
index 8ac6bf1..9f79b08 100644
--- a/src/frontend/app/root.css
+++ b/src/frontend/app/root.css
@@ -47,8 +47,9 @@
color-scheme: light;
--font-display: "Outfit Variable", ui-sans-serif, system-ui, sans-serif;
- --font-ui: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
- "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+ --font-ui:
+ ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
+ "Segoe UI Symbol", "Noto Color Emoji";
font-family: var(--font-ui);
}
@@ -215,6 +216,6 @@ textarea {
color: var(--ml-c-link-2);
}
-.maplibregl-ctrl-icon:before {
- display: none;
+.maplibregl-ctrl button .maplibregl-ctrl-icon:before {
+ display: none !important;
}
diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx
index 45dd935..a8c74b4 100644
--- a/src/frontend/app/routes/map.tsx
+++ b/src/frontend/app/routes/map.tsx
@@ -1,7 +1,7 @@
import StopDataProvider from "../data/StopDataProvider";
import "./map.css";
-import { useEffect, useRef, useState } from "react";
+import { useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import {
Layer,
@@ -10,16 +10,14 @@ import {
type MapRef,
} from "react-map-gl/maplibre";
import { useNavigate } from "react-router";
-import { PlannerOverlay } from "~/components/PlannerOverlay";
-import { AppMap } from "~/components/shared/AppMap";
import {
StopSummarySheet,
type StopSheetProps,
} from "~/components/map/StopSummarySheet";
-import { APP_CONSTANTS } from "~/config/constants";
+import { PlannerOverlay } from "~/components/PlannerOverlay";
+import { AppMap } from "~/components/shared/AppMap";
import { usePageTitle } from "~/contexts/PageTitleContext";
import { usePlanner } from "~/hooks/usePlanner";
-import { useApp } from "../AppContext";
import "../tailwind-full.css";
// Componente principal del mapa
@@ -142,7 +140,7 @@ export default function StopMap() {
"stop-renfe",
"feve",
"stop-feve",
- "#stop-generic",
+ "stop-generic",
],
"icon-size": [
"interpolate",
diff --git a/src/frontend/public/maps/spritesheet/sprite.json b/src/frontend/public/maps/spritesheet/sprite.json
index 1b3a78b..ed037c0 100644
--- a/src/frontend/public/maps/spritesheet/sprite.json
+++ b/src/frontend/public/maps/spritesheet/sprite.json
@@ -46,5 +46,13 @@
"width": 32,
"height": 32,
"pixelRatio": 1
+ },
+ "stop-generic": {
+ "id": "stop-generic",
+ "x": 192,
+ "y": 0,
+ "width": 32,
+ "height": 32,
+ "pixelRatio": 1
}
}
diff --git a/src/frontend/public/maps/spritesheet/sprite.png b/src/frontend/public/maps/spritesheet/sprite.png
index 1e676a3..1878558 100644
--- a/src/frontend/public/maps/spritesheet/sprite.png
+++ b/src/frontend/public/maps/spritesheet/sprite.png
Binary files differ
diff --git a/src/frontend/public/maps/spritesheet/sprite@2x.json b/src/frontend/public/maps/spritesheet/sprite@2x.json
index d2e89dd..5f652b9 100644
--- a/src/frontend/public/maps/spritesheet/sprite@2x.json
+++ b/src/frontend/public/maps/spritesheet/sprite@2x.json
@@ -46,5 +46,13 @@
"width": 64,
"height": 64,
"pixelRatio": 2
+ },
+ "stop-generic": {
+ "id": "stop-generic",
+ "x": 384,
+ "y": 0,
+ "width": 64,
+ "height": 64,
+ "pixelRatio": 2
}
}
diff --git a/src/frontend/public/maps/spritesheet/sprite@2x.png b/src/frontend/public/maps/spritesheet/sprite@2x.png
index 559b850..d676b56 100644
--- a/src/frontend/public/maps/spritesheet/sprite@2x.png
+++ b/src/frontend/public/maps/spritesheet/sprite@2x.png
Binary files differ