Query Question

662
1
04-26-2017 05:47 PM
Red_BullGIS
New Contributor

Hi Robert,

 

Why doesn't this work? Where visible is coming from an array of layerId's that are providing indexes for myQuery (it works for any random array eg ["alpha", "beta", "charlie"]:

 

var myQuery = ["Population>10000" , "Hispanic > 1500" , "Employees > 10000"];

var result = visible.map(function(e) {
return myQuery;
});

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Red Bull GIS,

   I have branched your question off to a new question as thread hijacking is frowned on (you should only add to an existing question if your question is relevant to the original posters question).

Now you issue is likely that the visible indexes in your array are other than 0,1,2 which is what would be required to get values from your array. 

example:

if e = 0 then

myQuery would return "Hispanic > 1500"

0 Kudos