OK, follow-up to everything here. I'm using the query method - is there any way to get it to return a value? I want to do something like:
var query = new Query();
query.where = "Zip = '" + SelectedZip + "'";
featLayer.queryCount(query, function(count) {
}, newfunction(count));
Then later in my code ...
function newfunction(number)
{
return number;
}
... so that I have access to whatever "count" was. Or maybe:
var query = new Query();
query.where = "Zip = '" + SelectedZip + "'";
featLayer.queryCount(query, function(count) {
var num = count;
}, newfunction(num));
... and then again, same "newfunction" as above. I've also tried something like:
var query = new Query();
query.where = "Zip = '" + SelectedZip + "'";
var num = featLayer.queryCount(query, function(count) {
return count;
});
So that, once again, I can access "count" elsewhere. Whenever I try to assign a variable within the queryCount function, it disappears into thin air after the function is over and done with, even if I declared that variable globally.
Hope that made sense.