fix(geoportal): Google satellite, ESC/right-click exit, no UAT fill, ANCPI bbox fix

Basemaps: added Google Satellite option
ANCPI ortofoto: fixed bbox conversion (all 4 corners, not just SW/NE)
Selection: ESC key and right-click exit selection mode, tooltips updated
UAT layers: removed fill (only lines + labels), less visual clutter
Proprietari vechi: greyed out (opacity-50) so current owners stand out

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-24 14:19:02 +02:00
parent 1cc73a3033
commit 3fcf7e2a67
6 changed files with 49 additions and 17 deletions
+11 -4
View File
@@ -31,12 +31,19 @@ function tileToBbox(z: number, x: number, y: number): [number, number, number, n
return [lonW, latS, lonE, latN];
}
/** Reproject WGS84 bbox to EPSG:3844 */
/** Reproject WGS84 bbox to EPSG:3844 using all 4 corners (handles projection curvature) */
function bboxTo3844(bbox4326: [number, number, number, number]): [number, number, number, number] {
const [w, s, e, n] = bbox4326;
const sw = proj4("EPSG:4326", "EPSG:3844", [w, s]);
const ne = proj4("EPSG:4326", "EPSG:3844", [e, n]);
return [sw[0]!, sw[1]!, ne[0]!, ne[1]!];
// Project all 4 corners to handle non-linear projection
const corners = [
proj4("EPSG:4326", "EPSG:3844", [w, s]),
proj4("EPSG:4326", "EPSG:3844", [e, s]),
proj4("EPSG:4326", "EPSG:3844", [w, n]),
proj4("EPSG:4326", "EPSG:3844", [e, n]),
];
const xs = corners.map((c) => c[0]!);
const ys = corners.map((c) => c[1]!);
return [Math.min(...xs), Math.min(...ys), Math.max(...xs), Math.max(...ys)];
}
// Simple in-memory cookie cache for eTerra session