Browse Source

improvements

master
o.moresis 2 years ago
parent
commit
41dc83be4c
  1. 17
      public/js/extras.js
  2. 2
      src/Data/descriptors.php

17
public/js/extras.js

@ -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,

2
src/Data/descriptors.php

@ -34,6 +34,8 @@ if (!empty($cellcode)) { @@ -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();
}
}

Loading…
Cancel
Save