From 9b4ff9e188d9130d0b8fe47231895f935631eaf4 Mon Sep 17 00:00:00 2001 From: livio Date: Mon, 28 Sep 2026 20:29:21 +0200 Subject: [PATCH] Always retain KML lines and points --- LMEMappeCatastaliApp.csproj | 4 ++-- README.md | 4 ++++ wwwroot/js/lme-map.js | 7 ++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/LMEMappeCatastaliApp.csproj b/LMEMappeCatastaliApp.csproj index 1441427..4a0a4cb 100644 --- a/LMEMappeCatastaliApp.csproj +++ b/LMEMappeCatastaliApp.csproj @@ -28,8 +28,8 @@ com.companyname.lmemappecatastaliapp - 0.4.8 - 43 + 0.4.9 + 44 $(ApplicationDisplayVersion) diff --git a/README.md b/README.md index 69f1848..2d5883a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ App .NET MAUI Blazor Hybrid per Android, iOS, Mac Catalyst e Windows, pensata per consultare mappe catastali e lavorare sul campo con GPS. +## Versione 0.4.9 + +- Linee e punti KML/KMZ vengono sempre importati, anche quando il documento viene riconosciuto come catastale; il filtro particelle separa soltanto i poligoni di foglio o cornice. + ## Versione 0.4.8 - Aggiornamento a .NET 10 e target Android API 36. diff --git a/wwwroot/js/lme-map.js b/wwwroot/js/lme-map.js index 2d21925..d9c595d 100644 --- a/wwwroot/js/lme-map.js +++ b/wwwroot/js/lme-map.js @@ -1013,12 +1013,13 @@ function normalizeKmlFiles(files) { const parcelSet = new Set(parcels); const sheetParts = polygonParts.filter(feature => !parcelSet.has(feature)); const nonPolygonFeatures = features.filter(feature => geometryPolygons(feature.geometry).length === 0); - const optionalFeatures = [...sheetParts, ...nonPolygonFeatures]; - if (!parcels.length && !(lmeState.includeKmlSheetLayer && optionalFeatures.length)) { + const importedFeatures = [...parcels, ...nonPolygonFeatures]; + const optionalFeatures = sheetParts; + if (!importedFeatures.length && !(lmeState.includeKmlSheetLayer && optionalFeatures.length)) { throw new Error("nessuna particella trovata; attiva 'includi layer del foglio' per importare gli altri elementi"); } return { - geojson: { type: "FeatureCollection", features: parcels }, + geojson: { type: "FeatureCollection", features: importedFeatures }, sheetGeojson: { type: "FeatureCollection", features: lmeState.includeKmlSheetLayer ? optionalFeatures : []