I have a simple query like
query.where = "NAME = 'Renfrew'";
which works perfectly on QueryTask(). Now I would like to select array of points like
query.where = "NAME = 'Central Branch' AND NAME = 'Renfrew'";
but it is not working. Can you please let me know how to fix this?
2 Answers 2
I suspect you are looking to use OR instead of AND in your query since no feature would have both of those names.
AND could be used with another attribute to further narrow your results.
Another option is to use in
, for example:
query.where = "NAME in ('Refrew', 'Central Branch')";
This is easier to manage (compared to a long series of OR
statements) once you get a significant number of Names to manage.
Explore related questions
See similar questions with these tags.