diff --git a/public/js/extras.js b/public/js/extras.js index 391b264..4310cc6 100644 --- a/public/js/extras.js +++ b/public/js/extras.js @@ -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, diff --git a/src/Data/descriptors.php b/src/Data/descriptors.php index 6ea2f4d..7353f77 100644 --- a/src/Data/descriptors.php +++ b/src/Data/descriptors.php @@ -34,6 +34,8 @@ if (!empty($cellcode)) { JOIN criterias c on cps.criteria_id = c.id JOIN descriptors d on c.parent_id = d.id WHERE station_reference_id = {$entity_id}"; +echo $query; +exit(); } }