diff --git a/src/app/(modules)/geoportal/page.tsx b/src/app/(modules)/geoportal/page.tsx index f0022c1..1e9a616 100644 --- a/src/app/(modules)/geoportal/page.tsx +++ b/src/app/(modules)/geoportal/page.tsx @@ -1,26 +1,12 @@ "use client"; -import "maplibre-gl/dist/maplibre-gl.css"; import { FeatureGate } from "@/core/feature-flags"; -import { useI18n } from "@/core/i18n"; import { GeoportalModule } from "@/modules/geoportal"; export default function GeoportalPage() { - const { t } = useI18n(); - return ( }> -
-
-

- {t("geoportal.title")} -

-

- {t("geoportal.description")} -

-
- -
+
); } diff --git a/src/app/(modules)/parcel-sync/page.tsx b/src/app/(modules)/parcel-sync/page.tsx index 9a3a305..4a176b7 100644 --- a/src/app/(modules)/parcel-sync/page.tsx +++ b/src/app/(modules)/parcel-sync/page.tsx @@ -1,6 +1,5 @@ "use client"; -import "maplibre-gl/dist/maplibre-gl.css"; import { FeatureGate } from "@/core/feature-flags"; import { useI18n } from "@/core/i18n"; import { ParcelSyncModule } from "@/modules/parcel-sync"; diff --git a/src/modules/geoportal/components/geoportal-module.tsx b/src/modules/geoportal/components/geoportal-module.tsx index d5b501a..071b75d 100644 --- a/src/modules/geoportal/components/geoportal-module.tsx +++ b/src/modules/geoportal/components/geoportal-module.tsx @@ -2,7 +2,6 @@ import { useState, useRef, useCallback } from "react"; import dynamic from "next/dynamic"; -import { Globe } from "lucide-react"; import { LayerPanel, getDefaultVisibility } from "./layer-panel"; import { BasemapSwitcher } from "./basemap-switcher"; import { SearchBar } from "./search-bar"; @@ -94,66 +93,54 @@ export function GeoportalModule() { }, []); return ( -
- {/* Header */} -
- -
-

Geoportal

-

- Harta interactiva cu parcele cadastrale, cladiri si limite UAT -

-
-
+
+ {/* Full-bleed map */} + - {/* Map container */} -
- + + - - {/* Top-left controls: search + layers */} -
- - -
- - {/* Top-right: basemap switcher */} -
- -
- - {/* Bottom-left: selection toolbar */} -
- -
- - {/* Right side: feature info panel */} - {clickedFeature && !selectionMode && ( -
- setClickedFeature(null)} - /> -
- )}
+ + {/* Top-right: basemap switcher (offset to avoid nav controls) */} +
+ +
+ + {/* Bottom-left: selection toolbar */} +
+ +
+ + {/* Right side: feature info panel */} + {clickedFeature && !selectionMode && ( +
+ setClickedFeature(null)} + /> +
+ )}
); } diff --git a/src/modules/geoportal/components/map-viewer.tsx b/src/modules/geoportal/components/map-viewer.tsx index 46573c6..10ad542 100644 --- a/src/modules/geoportal/components/map-viewer.tsx +++ b/src/modules/geoportal/components/map-viewer.tsx @@ -2,8 +2,19 @@ import { useRef, useEffect, useState, useCallback, useImperativeHandle, forwardRef } from "react"; import maplibregl from "maplibre-gl"; -import "maplibre-gl/dist/maplibre-gl.css"; import { cn } from "@/shared/lib/utils"; + +/* Ensure MapLibre CSS is loaded — static import fails with next/dynamic + standalone */ +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"; + document.head.appendChild(link); + } +} import type { BasemapId, ClickedFeature, LayerVisibility, SelectedFeature } from "../types"; /* ------------------------------------------------------------------ */