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