From 83ea1696cdc899e0612fa7c7555613824d1302aa 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 f1ae7a8..7a33178 100644 --- a/LMEMappeCatastaliApp.csproj +++ b/LMEMappeCatastaliApp.csproj @@ -28,8 +28,8 @@ it.liviomerola.lmemappecatastali.pro - 1.0.1 - 101 + 1.0.2 + 102 $(ApplicationDisplayVersion) diff --git a/README.md b/README.md index e20bf10..ca97188 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 Pro 1.0.2 test + +- 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 Pro 1.0.1 test - Il controllo aggiornamenti Pro ignora le release e gli APK della versione Base e segue esclusivamente il canale Pro. diff --git a/wwwroot/js/lme-map.js b/wwwroot/js/lme-map.js index 4cb5e14..b6487a9 100644 --- a/wwwroot/js/lme-map.js +++ b/wwwroot/js/lme-map.js @@ -1063,12 +1063,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 : []