diff --git a/LMEMappeCatastaliApp.csproj b/LMEMappeCatastaliApp.csproj
index 83c7544..91d563d 100644
--- a/LMEMappeCatastaliApp.csproj
+++ b/LMEMappeCatastaliApp.csproj
@@ -28,8 +28,8 @@
com.companyname.lmemappecatastaliapp
- 0.2.14
- 18
+ 0.2.15
+ 19
None
diff --git a/Services/AzureMapsService.cs b/Services/AzureMapsService.cs
index 6bce37d..ecc3a03 100644
--- a/Services/AzureMapsService.cs
+++ b/Services/AzureMapsService.cs
@@ -13,7 +13,7 @@ public sealed class AzureMapsService
public AzureMapsService()
{
- _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.14");
+ _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.15");
_httpClient.DefaultRequestHeaders.Accept.ParseAdd("application/json");
}
diff --git a/Services/NetworkLocationService.cs b/Services/NetworkLocationService.cs
index 3ce5f2e..8adeb3e 100644
--- a/Services/NetworkLocationService.cs
+++ b/Services/NetworkLocationService.cs
@@ -13,7 +13,7 @@ public sealed class NetworkLocationService
public NetworkLocationService()
{
- httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.14");
+ httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.15");
}
public async Task GetApproximateLocationAsync(
diff --git a/wwwroot/js/lme-map.js b/wwwroot/js/lme-map.js
index 8aebabb..cce2a41 100644
--- a/wwwroot/js/lme-map.js
+++ b/wwwroot/js/lme-map.js
@@ -469,23 +469,9 @@ function bindFileImport() {
try {
const result = await readGisFile(file);
const geojson = result.geojson;
- const parcelLayer = L.geoJSON(geojson, {
- style: { color: "#22c55e", weight: 3, opacity: 0.95, fillOpacity: 0.18 },
- pointToLayer: (feature, latlng) => L.circleMarker(latlng, { radius: 7, color: "#22c55e", fillColor: "#ffffff", fillOpacity: 0.9 }),
- onEachFeature: (feature, layer) => {
- const name = feature?.properties?.name || file.name;
- layer.bindPopup(`${escapeHtml(name)}`);
- }
- }).addTo(lmeState.imported);
+ const parcelLayer = addImportedFeatures(geojson);
const sheetGeojson = result.sheetGeojson || emptyFeatureCollection();
- const sheetLayer = L.geoJSON(sheetGeojson, {
- style: { color: "#15803d", weight: 3, opacity: 0.85, fillOpacity: 0.04, dashArray: "9 7" },
- pointToLayer: (feature, latlng) => L.circleMarker(latlng, { radius: 6, color: "#15803d", fillOpacity: 0.25 }),
- onEachFeature: (feature, layer) => {
- const name = feature?.properties?.name || "Foglio catastale importato";
- layer.bindPopup(`${escapeHtml(name)}`);
- }
- }).addTo(lmeState.importedSheets);
+ const sheetLayer = addImportedSheetFeatures(sheetGeojson);
applyImportedSheetVisibility();
fitLayer(geojson.features.length ? parcelLayer : sheetLayer);
refreshImportedMeasurements();
@@ -904,7 +890,7 @@ function setImportedSheetLayerVisible(enabled) {
applyImportedSheetVisibility();
const count = lmeState.importedSheets?.toGeoJSON()?.features?.length || 0;
setInfo(lmeState.importedSheetsVisible
- ? (count ? `Layer del foglio importato visibile (${count} elementi).` : "Il layer del foglio sara visibile quando verra importato.")
+ ? (count ? `Layer del foglio importato visibile (${count} elementi).` : "Nessun layer del foglio importato: ricarica il KML/KMZ con 'includi anche il layer del foglio' attivo.")
: "Layer del foglio importato nascosto; le particelle restano visibili.");
}
@@ -942,11 +928,12 @@ function addImportedFeatures(geojson) {
function addImportedSheetFeatures(geojson) {
return L.geoJSON(geojson || emptyFeatureCollection(), {
- style: { color: "#15803d", weight: 3, opacity: 0.85, fillOpacity: 0.04, dashArray: "9 7" },
+ style: { color: "#f59e0b", weight: 4, opacity: 1, fillOpacity: 0.03, dashArray: "10 6" },
pointToLayer: (feature, latlng) => L.circleMarker(latlng, {
- radius: 6,
- color: "#15803d",
- fillOpacity: 0.25
+ radius: 7,
+ color: "#f59e0b",
+ fillColor: "#ffffff",
+ fillOpacity: 0.85
}),
onEachFeature: bindStoredFeaturePopup
}).addTo(lmeState.importedSheets);
@@ -960,8 +947,11 @@ function applyImportedSheetVisibility() {
if (!lmeState.map.hasLayer(lmeState.importedSheets)) {
lmeState.importedSheets.addTo(lmeState.map);
}
- lmeState.importedSheets.bringToBack();
+ lmeState.importedSheets.bringToFront();
lmeState.imported.bringToFront();
+ lmeState.selectedParcelsLayer.bringToFront();
+ lmeState.gpsParcelLayer.bringToFront();
+ lmeState.drawings.bringToFront();
return;
}
if (lmeState.map.hasLayer(lmeState.importedSheets)) {