1const minZoom = 5; 2const maxZoom = 14; 3 4function setupBaseLayers(accessToken) { 5 const whiteLayer = L.tileLayer('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wAAAAgAB9DhnJ4AAAAASUVORK5CYII='); 6 const osmLayer = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { 7 attribution: "Basemap data: © <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors" 8 }); 9 const osmTopoLayer = L.tileLayer('https://tile.opentopomap.org/{z}/{x}/{y}.png', { 10 attribution: "Basemap data: © <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors, <a href='http://viewfinderpanoramas.org'>SRTM</a> | map style: © <a href='https://opentopomap.org'>OpenTopoMap</a> (<a href='https://creativecommons.org/licenses/by-sa/3.0/'>CC-BY-SA</a>)" 11 }); 12 const osmCycleLayer = L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', { 13 attribution: "© OpenStreetMap contributors" 14 }); 15 16 // const PositronLayer = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', { 17 // attribution: '©OpenStreetMap, ©CartoDB', 18 // subdomains: 'abcd', 19 // }) 20 // const terrainLayer = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/outdoors-v11/tiles/{z}/{x}/{y}?access_token={accessToken}', { 21 // attribution: 'Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="https://www.mapbox.com/">Mapbox</a>', 22 // accessToken: accessToken, 23 // id: 'outdoors-v11' 24 // }); 25 // const darkLayer = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', { 26 // attribution: 'Map data © Mapbox', 27 // id: 'mapbox/dark-v11', 28 // accessToken: accessToken 29 // }); 30 // const satelliteLayer = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}
30?access_token=' + accessToken, { 31 // attribution: '© Mapbox contributors', 32 // id: 'satellite-streets-v12' 33 // }); 34 35 const layers = { 36 "No Background": whiteLayer, 37 "OSM Map": osmLayer, 38 "OSM Topo": osmTopoLayer, 39 "OSM Cycle": osmCycleLayer, 40 // "Light Map": PositronLayer, 41 // "Dark Map": darkLayer, 42 // "Terrain": terrainLayer, 43 // "Satellite": satelliteLayer 44 }; 45 46 return layers 47} 48 49function setupInclusiveOverlayLayers(){ 50 const wmsSubsidence = L.tileLayer.wms('https://gs2.mapsdev.com/geoserver/subsidence/wms', { 51 VERSION: '1.1.0', 52 LAYERS: 'subsidence:subsidence_rate_2014-2020_desc_mmpr_v1.0.0', 53 STYLES: 'cm_spectral', 54 format: 'image/png', 55 transparent: true, 56 env: "c1:0;c2:50;c3:100;c4:200;c5:250", 57 tms: true, 58 minZoom: minZoom, 59 maxZoom: maxZoom, 60 attribution: "Contains modified Copernicus Sentinel data 2022, processed by ESA." 61 }); 62 return {"Subsidence": wmsSubsidence} 63} 64 65function setupExclusiveOverlayLayers() { 66 const wmsSeasonal = L.tileLayer.wms('https://gs2.mapsdev.com/geoserver/subsidence/wms', { 67 VERSION: '1.1.0', 68 LAYERS: 'subsidence:seasonal_amplitude_2014-2020_desc_mm_v1.0.0', 69 STYLES: 'cm_viridis', 70 format: 'image/png', 71 transparent: true, 72 env: "c1:0;c2:25;c3:50;c4:75;c5:100", 73 tms: true, 74 minZoom: minZoom, 75 maxZoom: maxZoom, 76 attribution: "Contains modified Copernicus Sentinel data 2022, processed by ESA." 77 }); 78 const wmsCountiesSubsidenceArea = L.tileLayer.wms('https://gs.mapsdev.com/geoserver/subsidence/wms', { 79 VERSION: '1.1.0', 80 LAYERS: 'subsidence:counties_2014-2020_v1.0.0', 81 STYLES: 'subsidence:subsidence_area_percent_white_to_red', 82 format: 'image/png', 83 transparent: true, 84 tms: true, 85 minZoom: minZoom, 86 maxZoom: maxZoom, 87 attribution: "Contains modified Copernicus Sentinel data 2022, processed by ESA." 88 }); 89 const wmsProvincesSubsidenceArea = L.tileLayer.wms('https://gs.mapsdev.com/geoserver/subsidence/wms', { 90 VERSION: '1.1.0', 91 LAYERS: 'subsidence:provinces_2014-2020_v1.0.0', 92 STYLES: 'subsidence:subsidence_area_percent_white_to_red', 93 format: 'image/png', 94 transparent: true, 95 tms: true, 96 minZoom: minZoom, 97 maxZoom: maxZoom, 98 attribution: "Contains modified Copernicus Sentinel data 2022, processed by ESA." 99 }); 100 const wmsMajorBasinSubsidenceArea = L.tileLayer.wms('https://gs.mapsdev.com/geoserver/subsidence/wms', { 101 VERSION: '1.1.0', 102 LAYERS: 'subsidence:major_catchments_2014-2020_v1.0.0', 103 STYLES: 'subsidence:counties_subsidence_area_percent_white+reds', 104 format: 'image/png', 105 transparent: true, 106 tms: true, 107 minZoom: minZoom, 108 maxZoom: maxZoom, 109 attribution: "Contains modified Copernicus Sentinel data 2022, processed by ESA." 110 }); 111 const wmsMinorBasinSubsidenceArea = L.tileLayer.wms('https://www.geo.mapsdev.com/geoserver/subsidence/wms', { 112 VERSION: '1.1.0', 113 LAYERS: 'subsidence:minor_catchments_2014-2020_v1.0.0', 114 STYLES: 'subsidence:counties_subsidence_area_percent_white+reds', 115 format: 'image/png', 116 transparent: true, 117 tms: true, 118 minZoom: minZoom, 119 maxZoom: maxZoom, 120 attribution: "Contains modified Copernicus Sentinel data 2022, processed by ESA." 121 }); 122 123 return { 124 "Seasonal": wmsSeasonal, 125// "Counties": wmsCountiesSubsidenceArea, 126// "Provinces": wmsProvincesSubsidenceArea, 127 // "Major Basin": wmsMajorBasinSubsidenceArea, 128 // "Minor Basin": wmsMinorBasinSubsidenceArea, 129 }; 130} 131 132 133 134 135 136 137
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.