So we are making a map that allows users to search for certain results depending on what they check. Say bars or restaurants but it also needs to be able to select multiple items and display them. I'm having trouble finding any examples on the sample page. Would anyone have a good location for me to start researching?
Solved! Go to Solution.
These are both really cheesy example but they show how to toggle on and off layers and check multiple boxes.
Toggle layer visibility | ArcGIS API for JavaScript
Dynamically create layer list | ArcGIS API for JavaScript
Hope this helps.
Robert,
I would start with the "Manage result from multiple queries" sample. Manage results from multiple queries | ArcGIS API for JavaScript That sample shows how to query multiple layers of a mapservice for the same geometry. Then you just have to decide how that search geometry is going to be defined (like the current extent of the map) and how the user will specify which layers get queried (like though a list that allows for multiple selections).
These are both really cheesy example but they show how to toggle on and off layers and check multiple boxes.
Toggle layer visibility | ArcGIS API for JavaScript
Dynamically create layer list | ArcGIS API for JavaScript
Hope this helps.
We've got some new sample applications coming down the pipeline on GitHub, check out our quickstart app:
There is one specific new sample that you might find interesting, the Find Places by Category sample:
These are just some good jumping-off points, feel free to peruse our entire JavaScript samples library:
Regards,
-Noah