update frontend
This commit is contained in:
parent
5b3d35cd25
commit
48edeb03fe
14
index.html
14
index.html
|
|
@ -4,14 +4,14 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- PWA + Favicon -->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/icons/apple-touch-icon.png" />
|
||||
<meta name="theme-color" content="#0ea5e9" />
|
||||
|
||||
<!-- Description + Open Graph (Facebook/Twitter/WhatsApp) -->
|
||||
<meta name="description" content="SocioWire - Wired to life. Local news, events, market deals & friends on map." />
|
||||
<!-- PWA Manifest -->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
|
||||
<!-- Meta pour partage (logo + titre + description) -->
|
||||
<meta property="og:title" content="SocioWire.com - Wired to life" />
|
||||
<meta property="og:description" content="Local news, events, market deals & friends on the map." />
|
||||
<meta property="og:image" content="%PUBLIC_URL%/icons/og-image.png" />
|
||||
|
|
@ -24,11 +24,11 @@
|
|||
<meta name="twitter:description" content="Local news, events, market deals & friends on the map." />
|
||||
<meta name="twitter:image" content="%PUBLIC_URL%/icons/og-image.png" />
|
||||
|
||||
<!-- Titre -->
|
||||
<!-- Titre de la page -->
|
||||
<title>SocioWire.com - Wired to life</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
// <script type="module" src="/src/main.jsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -49,20 +49,14 @@ export function useMapCore(theme) {
|
|||
const el = expandedElRef.current;
|
||||
if (!el) return;
|
||||
|
||||
// overlay style
|
||||
if (el.__swClose) {
|
||||
try {
|
||||
el.__swClose();
|
||||
} catch {}
|
||||
try { el.__swClose(); } catch {}
|
||||
expandedElRef.current = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// legacy marker-expanded style
|
||||
if (el.__renderCompact) {
|
||||
try {
|
||||
el.__renderCompact();
|
||||
} catch {}
|
||||
try { el.__renderCompact(); } catch {}
|
||||
}
|
||||
expandedElRef.current = null;
|
||||
}
|
||||
|
|
@ -75,7 +69,7 @@ export function useMapCore(theme) {
|
|||
style: getBaseStyle(theme || "dark"),
|
||||
center: [-95, 40],
|
||||
zoom: 3.5,
|
||||
pitch: 0,
|
||||
pitch: 45, // ACTIVATION DU TILT 3D PAR DÉFAUT (globe incliné)
|
||||
bearing: 0,
|
||||
antialias: true,
|
||||
});
|
||||
|
|
@ -88,16 +82,16 @@ export function useMapCore(theme) {
|
|||
if (typeof v.lat === "number" && typeof v.lon === "number" && typeof v.zoom === "number") {
|
||||
map.setCenter([v.lon, v.lat]);
|
||||
map.setZoom(v.zoom);
|
||||
map.setPitch(45); // tilt 3D forcé
|
||||
hadLastView = true;
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
setHasLastView(hadLastView);
|
||||
|
||||
map.addControl(new maplibregl.NavigationControl(), "top-right");
|
||||
map.addControl(new maplibregl.NavigationControl({ showCompass: true, showZoom: true }), "top-right");
|
||||
mapRef.current = map;
|
||||
|
||||
// ✅ Ensure viewParams is set immediately so posts load without moving the map
|
||||
try { setViewParams(getViewFromMap(map)); } catch {}
|
||||
|
||||
const reOcclude = () => {
|
||||
|
|
@ -107,12 +101,13 @@ export function useMapCore(theme) {
|
|||
map.on("move", reOcclude);
|
||||
map.on("zoom", reOcclude);
|
||||
|
||||
// ignore close while auto actions are happening
|
||||
map.on("click", () => { closeExpandedIfAny(); });
|
||||
|
||||
map.on("dragstart", () => { closeExpandedIfAny(); });
|
||||
|
||||
map.on("load", () => setViewParams(getViewFromMap(map)));
|
||||
map.on("load", () => {
|
||||
setViewParams(getViewFromMap(map));
|
||||
map.setPitch(45); // tilt 3D forcé au load
|
||||
});
|
||||
|
||||
map.on("moveend", () => {
|
||||
const vp = getViewFromMap(map);
|
||||
|
|
@ -131,7 +126,6 @@ export function useMapCore(theme) {
|
|||
map.remove();
|
||||
mapRef.current = null;
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue