fix(geoportal): enrichment panel update + force-hide all layers + boundary filter
1. Enrichment: panel now updates immediately with returned data (was only showing message) 2. Layers: ALL data layers set to visibility:none immediately after creation, then only enabled ones are shown. Fixes cladiri appearing when only terenuri toggled. 3. OpenFreeMap boundaries: also filter by source-layer="boundary" (more reliable) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -76,7 +76,13 @@ export function FeatureInfoPanel({ feature, onClose }: FeatureInfoPanelProps) {
|
||||
});
|
||||
const d = await resp.json();
|
||||
if (resp.ok) {
|
||||
setEnrichMsg(d.message ?? "Enrichment pornit");
|
||||
// Update panel with enrichment data immediately
|
||||
if (d.enrichment && detail) {
|
||||
setDetail({ ...detail, enrichment: d.enrichment, enrichedAt: new Date().toISOString() });
|
||||
setEnrichMsg("");
|
||||
} else {
|
||||
setEnrichMsg(d.message ?? "Enrichment finalizat");
|
||||
}
|
||||
} else {
|
||||
setEnrichMsg(d.error ?? "Eroare la enrichment");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user