fix(geoportal): fullscreen route + local CSS + proper layout
- Add /geoportal to FULLSCREEN_ROUTES (overflow-hidden, no padding) - Copy maplibre-gl.css to public/ and load from same origin (avoids CDN/CSP) - Simplify layout: fill parent via h-full w-full (no negative margin hack) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,14 +4,15 @@ import { useRef, useEffect, useState, useCallback, useImperativeHandle, forwardR
|
||||
import maplibregl from "maplibre-gl";
|
||||
import { cn } from "@/shared/lib/utils";
|
||||
|
||||
/* Ensure MapLibre CSS is loaded — static import fails with next/dynamic + standalone */
|
||||
/* Ensure MapLibre CSS is loaded — static import fails with next/dynamic + standalone.
|
||||
Load from /public to avoid CDN/CSP issues. */
|
||||
if (typeof document !== "undefined") {
|
||||
const LINK_ID = "maplibre-gl-css";
|
||||
if (!document.getElementById(LINK_ID)) {
|
||||
const link = document.createElement("link");
|
||||
link.id = LINK_ID;
|
||||
link.rel = "stylesheet";
|
||||
link.href = "https://unpkg.com/maplibre-gl@5.21.0/dist/maplibre-gl.css";
|
||||
link.href = "/maplibre-gl.css";
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user