From e3d98c2e5d2b8cbfbe7f364454b21e00e77dbc69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Tue, 8 Jul 2025 14:44:01 +0200 Subject: [PATCH] Move boundaries to base map control --- webgis/js/gis.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webgis/js/gis.js b/webgis/js/gis.js index e15983f..d9471dd 100644 --- a/webgis/js/gis.js +++ b/webgis/js/gis.js @@ -70,7 +70,6 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) { let layerVincoli = await this.loadGeoJSON('vincoli.geojson', Options.constraintsArch); let layerPaesistici = await this.loadGeoJSON('paesistici.geojson', Options.constraintsLand); - let boundaries = await this.loadGeoJSON('confini.geojson', {}, false); let buildings = await this.loadGeoJSON('fabbricati.geojson', Options.buildings, false); await this.addLayerGroups(map); @@ -92,7 +91,6 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) { ); const cartography = { 'Catasto Agenzia delle Entrate (zoom per visualizzare)' : wmsLayer, - 'Limiti comuni' : boundaries, 'Fabbricati' : buildings, 'Vincoli archeologici' : layerVincoli, 'Vincoli paesaggistici' : layerPaesistici, @@ -355,11 +353,14 @@ GIS.initLayers = async function(map) { attribution: '© Mapbox' }); + let boundaries = await this.loadGeoJSON('confini.geojson', {}, false); + const baseGroup = new L.LayerGroup([osmap]); baseGroup.addTo(map); const baseMap = { "OpenStreetMap" : osmap, "Satellite" : mapbox, + 'Limiti amministrativi' : boundaries, }; return baseMap;