|
|
|
@ -355,28 +355,29 @@ function initializeLayerTree() {
@@ -355,28 +355,29 @@ function initializeLayerTree() {
|
|
|
|
|
|
|
|
|
|
function getWFD(layer) { |
|
|
|
|
var wmsGroup = L.layerGroup(); |
|
|
|
|
const layerName = layer.code; |
|
|
|
|
const layerTitle = layer.title; |
|
|
|
|
const legendName = layerName.split('_').slice(1,3).join('_'); |
|
|
|
|
const layerCode = layer.code; |
|
|
|
|
const layerTitle = layer.name; |
|
|
|
|
const legendName = layerCode.split('_').slice(1,3).join('_'); |
|
|
|
|
const lgndUrl = BASE_URL + "/img/legends/" + legendName + ".png"; |
|
|
|
|
let l; |
|
|
|
|
console.debug('layer: : : ', layer); |
|
|
|
|
|
|
|
|
|
l = L.tileLayer.wms(BASE_URL + '/geoserver/wms', { transparent: true, layers: layerName + layer.minSuffix, format: 'image/png'}); |
|
|
|
|
l = L.tileLayer.wms(BASE_URL + '/geoserver/wms', { transparent: true, layers: layerCode + layer.minSuffix, format: 'image/png'}); |
|
|
|
|
wmsGroup.addLayer(l); |
|
|
|
|
|
|
|
|
|
layerControls[layerName] = L.control.slider(value => { |
|
|
|
|
layerControls[layerCode] = L.control.slider(value => { |
|
|
|
|
wmsGroup.removeLayer(l); |
|
|
|
|
l = L.tileLayer.wms(BASE_URL + '/geoserver/wms', { transparent: true, layers: layerName + value, format: 'image/png'}); |
|
|
|
|
l = L.tileLayer.wms(BASE_URL + '/geoserver/wms', { transparent: true, layers: layerCode + value, format: 'image/png'}); |
|
|
|
|
wmsGroup.addLayer(l); |
|
|
|
|
},{ |
|
|
|
|
min: layer.minSuffix, |
|
|
|
|
max: layer.maxSuffix, |
|
|
|
|
step: 1, |
|
|
|
|
value: layer.minSuffix, |
|
|
|
|
logo: 'Year Selector', |
|
|
|
|
logo: 'Year Selector ' + layerTitle, |
|
|
|
|
}).addTo(mapL); |
|
|
|
|
|
|
|
|
|
legends[layerName] = L.control.Legend({ |
|
|
|
|
legends[layerCode] = L.control.Legend({ |
|
|
|
|
position: "bottomright", |
|
|
|
|
title: layerTitle, |
|
|
|
|
symbolWidth: 90, |
|
|
|
|