WMS in layers control
This commit is contained in:
parent
6f632c3ee2
commit
f68216c84c
@ -61,7 +61,7 @@
|
||||
<span class="icon mr-2">
|
||||
<i class="fa fa-map"></i>
|
||||
</span>
|
||||
Cartografia
|
||||
Catasto storico
|
||||
</button>
|
||||
<button class="button is-outlined is-rounded is-link mr-4 mt-1" id="howto" title="Istruzioni">
|
||||
<span class="icon is-large has-text-link">
|
||||
@ -284,20 +284,6 @@
|
||||
</template>
|
||||
<aside class="menu ml-4 mt-3" data-id="cartography-aside">
|
||||
<button title="Chiudi menu" class="delete is-pulled-right" data-action="menu#closeCartography"></button>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<input type="checkbox" data-controller="layer" data-action="layer#toggleCadastral" />
|
||||
Catasto Agenzia delle Entrate (particelle e fabbricati)
|
||||
</li>
|
||||
</ul>
|
||||
<p class="menu-label is-size-5 mt-4 is-clickable" data-id="historic">
|
||||
<span role="button" data-action="click->menu#toggle" data-id="historic">
|
||||
Catasto storico
|
||||
<span class="icon pl-2">
|
||||
<i class="fa fa-chevron-right" data-menu-target="icon" data-id="historic"></i>
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -114,31 +114,30 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) {
|
||||
await this.addLayerGroups(map);
|
||||
await this.fetchCartographyLayers();
|
||||
|
||||
const archeo = {
|
||||
'Vincoli archeologici' : layerVincoli,
|
||||
'Vincoli paesistici' : layerPaesistici,
|
||||
//'Catasto storico' : historicCadastre,
|
||||
};
|
||||
L.control.layers(baseMap, archeo).addTo(map);
|
||||
|
||||
GisState.map = map;
|
||||
|
||||
const reprojectedWMSLayer = GIS.reprojectWMS();
|
||||
const wmsLayer = new reprojectedWMSLayer(
|
||||
'https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php?',
|
||||
{
|
||||
layers: 'CP.CadastralParcel,fabbricati',
|
||||
layers: 'CP.CadastralParcel,codice_plla,fabbricati',
|
||||
transparent: true,
|
||||
format: 'image/png',
|
||||
version: '1.1.1',
|
||||
minZoom: 15,
|
||||
minZoom: this.INIT_ZOOM,
|
||||
maxZoom: this.MAX_ZOOM,
|
||||
tileSize: 1024,
|
||||
opacity: 0.6,
|
||||
}
|
||||
);
|
||||
const cartography = {
|
||||
'Catasto Agenzia delle Entrate (zoom per visualizzare)' : wmsLayer,
|
||||
'Vincoli archeologici' : layerVincoli,
|
||||
'Vincoli paesaggistici' : layerPaesistici,
|
||||
};
|
||||
L.control.layers(baseMap, cartography).addTo(map);
|
||||
|
||||
GisState.cartography.cadastral = wmsLayer;
|
||||
GisState.map = map;
|
||||
|
||||
//GisState.cartography.cadastral = wmsLayer;
|
||||
|
||||
return map;
|
||||
}
|
||||
@ -398,7 +397,7 @@ GIS.initLayers = async function(map) {
|
||||
const baseMap = {
|
||||
"OpenStreetMap" : osmap,
|
||||
"Satellite" : mapbox,
|
||||
"Cartografia catastale" : baseCatasto,
|
||||
"Fabbricati e limiti comuni" : baseCatasto,
|
||||
};
|
||||
|
||||
return baseMap;
|
||||
|
Loading…
Reference in New Issue
Block a user