Fix Agency cadastral WMS coordinate system
This commit is contained in:
1 parent
abc9516a0d
commit
3d2fdcc416
4 files changed
+31
-8
No files matched your search
@@ -28,8 +28,8 @@
|
||||
<ApplicationId>com.companyname.lmemappecatastaliapp</ApplicationId>
|
||||
|
||||
<!-- Versions -->
|
||||
<ApplicationDisplayVersion>0.2.5</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>9</ApplicationVersion>
|
||||
<ApplicationDisplayVersion>0.2.6</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>10</ApplicationVersion>
|
||||
|
||||
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
|
||||
<WindowsPackageType>None</WindowsPackageType>
|
||||
|
||||
@@ -29,6 +29,7 @@ App .NET MAUI Blazor Hybrid per Android, iOS, Mac Catalyst e Windows, pensata pe
|
||||
- Comandi separati per rimuovere le particelle selezionate o pulire importazioni, disegni, POI e traccia GPS.
|
||||
- Anteprima WMS ufficiale mostrata dentro l'app senza aprire una nuova finestra Android.
|
||||
- Confini delle particelle selezionate e della particella GPS sovrapposti anche all'anteprima WMS corrente.
|
||||
- Richieste WMS catastali in EPSG:4258 compatibili con il servizio AdE; i numeri particella sono visibili alle scale di dettaglio consentite dal servizio (circa zoom 17 o superiore).
|
||||
- Collegamenti separati al Geoportale pubblico e all'Area riservata AdE per CAPTCHA, SPID/CIE e download ufficiali.
|
||||
|
||||
## Limite ufficiale AdE da considerare
|
||||
|
||||
@@ -13,7 +13,7 @@ public sealed class AzureMapsService
|
||||
|
||||
public AzureMapsService()
|
||||
{
|
||||
_httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.5");
|
||||
_httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.6");
|
||||
_httpClient.DefaultRequestHeaders.Accept.ParseAdd("application/json");
|
||||
}
|
||||
|
||||
|
||||
+27
-5
@@ -26,6 +26,10 @@ const lmeState = {
|
||||
azureAttribution: null
|
||||
};
|
||||
|
||||
// AdE publishes the cadastral WMS in ETRS89. WMS 1.1.1 keeps the longitude,
|
||||
// latitude BBOX order expected by Leaflet while sending the required CRS code.
|
||||
const cadastreCrs = L.extend({}, L.CRS.EPSG4326, { code: "EPSG:4258" });
|
||||
|
||||
window.lmeMap = {
|
||||
init,
|
||||
showSearchResult,
|
||||
@@ -291,7 +295,10 @@ function exportCadastreView() {
|
||||
previewMap.hidden = false;
|
||||
const highlightedCount = lmeState.selectedParcelsLayer.getLayers().length
|
||||
+ lmeState.gpsParcelLayer.getLayers().length;
|
||||
setInfo(`Vista WMS caricata con ${layers.length} layer e ${highlightedCount} particelle evidenziate.`);
|
||||
const zoomHint = layers.includes("codice_plla") && lmeState.map.getZoom() < 17
|
||||
? " Ingrandisci almeno fino a zoom 17 per leggere i numeri delle particelle."
|
||||
: "";
|
||||
setInfo(`Vista WMS caricata con ${layers.length} layer e ${highlightedCount} particelle evidenziate.${zoomHint}`);
|
||||
};
|
||||
image.onerror = () => {
|
||||
previewMap.hidden = true;
|
||||
@@ -782,16 +789,31 @@ function refreshCadastreLayer() {
|
||||
return;
|
||||
}
|
||||
|
||||
lmeState.cadastre = L.tileLayer.wms(cadastreUrl(), {
|
||||
const cadastreLayer = L.tileLayer.wms(cadastreUrl(), {
|
||||
layers: layers.join(","),
|
||||
format: "image/png",
|
||||
transparent: true,
|
||||
version: "1.3.0",
|
||||
crs: L.CRS.EPSG4326,
|
||||
version: "1.1.1",
|
||||
crs: cadastreCrs,
|
||||
maxZoom: 22,
|
||||
opacity: lmeState.cadastreOpacity,
|
||||
attribution: "Agenzia delle Entrate - CC BY 4.0"
|
||||
}).addTo(lmeState.map);
|
||||
});
|
||||
|
||||
let errorShown = false;
|
||||
cadastreLayer.on("tileerror", () => {
|
||||
if (errorShown) {
|
||||
return;
|
||||
}
|
||||
|
||||
errorShown = true;
|
||||
setInfo("Layer catastali non caricati dal servizio AdE. Controlla la connessione e riprova.");
|
||||
});
|
||||
cadastreLayer.on("load", () => {
|
||||
errorShown = false;
|
||||
});
|
||||
|
||||
lmeState.cadastre = cadastreLayer.addTo(lmeState.map);
|
||||
}
|
||||
|
||||
function activeCadastreLayers() {
|
||||
|
||||
Reference in new issue
Block a user