var Bbox_width= 18.99-5.93; var startResolution = Bbox_width/1024; var grid_resolution = new Array(22); for (var i = 0; i < 22; ++i) { grid_resolution[i] = startResolution / Math.pow(2, i); } var crs_6706 = new L.Proj.CRS('EPSG:6706', '+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs', { origin: [0, 0], bounds: L.bounds([5.93, 34.76], [18.99, 47.1]), resolutions: grid_resolution }) //############################################################################## //######## ADD LAYER WMS ####################################################### //############################################################## NB: CATASTO AdE // Definisce le opzioni per l'oggetto L.WMS.source var options = { 'format': "image/png", 'transparent': true, 'crs': crs_6706, 'version': "1.1.1", 'maxZoom': 21, 'tiled': "tiled" , 'tileSize': 1000, 'QUERY_LAYERS': "fabbricati", 'info_format': "text/html", "attribution": '© ' + 'Agenzia delle Entrate CC-BY-NC-ND 4.0' }; var urlCAT = "https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php"; L.WMS.Source = L.WMS.Source.extend({ 'ajax': function(url, callback) { $.ajax(url, { 'context': this, 'success': function(result) { // console.log(result) // $("#results").append(result); // $(" table, tr, th").removeClass('wmstable') // if (!globalSelect) sidebar.open("results"); } }); }, 'showFeatureInfo': function(latlng, info) { // console.log(info); } }); var sourceCAT = L.WMS.source(urlCAT, options ); var cat = sourceCAT.getLayer('province,CP.CadastralZoning,CP.CadastralParcel,fabbricati,vestizioni'); // var cat = sourceCAT.getLayer('fabbricati'); cat.setOpacity(0.5); //##############################################################################