Commit 9666743a by vida092

mapa target

parent bfb7dc8a
......@@ -2256,13 +2256,20 @@ var map_module = (function (url_geoserver, workspace, verbose, url_zacatuche) {
}
console.log(label_target)
var subquery = _LABEL_MAP.map(taxon => `${label_target}= \'${taxon}\'`).join(" OR ")
console.log(subquery)
if ( fecha_ini.length < 3)
var query = 'query{occurrences_by_taxon_' + nodo + '(query: "nombreenfermedad = \''+ _DISEASE_SELECTED + '\' AND '+ label_target +' = \'' + _LABEL_VALUE +'\' "){individuosinfectados gridid_'+ _grid_res + '}}'
var query = 'query{occurrences_by_taxon_' + nodo + '(query: "nombreenfermedad = \''+ _DISEASE_SELECTED + '\' AND ' + subquery +' "){individuosinfectados gridid_'+ _grid_res + '}}'
else
var query = 'query{occurrences_by_taxon_' + nodo + '(query: "nombreenfermedad = \''+ _DISEASE_SELECTED + '\' AND '+ label_target +' = \'' + _LABEL_VALUE +'\' AND aniocolecta >= \''+ fecha_ini + ' \' AND aniocolecta <= \'' + fecha_fin + ' \'"){individuosinfectados gridid_'+ _grid_res + '}}'
var query = 'query{occurrences_by_taxon_' + nodo + '(query: "nombreenfermedad = \''+ _DISEASE_SELECTED + '\' AND '+ subquery +' AND aniocolecta >= \''+ fecha_ini + ' \' AND aniocolecta <= \'' + fecha_fin + ' \'"){individuosinfectados gridid_'+ _grid_res + '}}'
console.log(query)
console.log(_LABEL_MAP)
$.ajax({
method: "POST",
......
......@@ -1496,6 +1496,7 @@ var variable_module = (function (verbose, url_zacatuche) {
$("#jstree_variables_species_" + id).off('ready.jstree', self.loadNodes);
self.arrayVarSelected = [];
_LABEL_MAP=[]
// self.groupvar_dataset = [];
self.cleanVariables('jstree_variables_species_' + id, 'treeAddedPanel_' + id, _TYPE_BIO);
......@@ -2361,6 +2362,12 @@ var variable_module = (function (verbose, url_zacatuche) {
console.log(arraySelected)
const iterator = arraySelected.values();
_LABEL_MAP = []
arraySelected.forEach(element =>{
_LABEL_MAP.push(element.label)
})
console.log(_LABEL_MAP)
for (const value of iterator) {
var variable = value
console.log(variable)
......@@ -2368,10 +2375,10 @@ var variable_module = (function (verbose, url_zacatuche) {
_LABEL_VALUE = variable["label"]
console.log(_PARENT_FIELD)
console.log(_LABEL_VALUE)
}
if (arraySelected.length === 0)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment