Select to view content in your preferred language

How can i create a checkboxes TOC dynamic

403
1
01-05-2024 05:47 PM
DiegoOspina
New Contributor

Hello guys, I need help, I must create a TOC of checkboxes with the following structure, a checkbox for the year, when I select the year, it displays 4 checkboxes, one for each quarter, and if I select a quarter, it must display 5 checkboxes that allow me to select the meteorological variable that I want to observe. Regarding the base map, I take the information by making a rest request to the service's json, which I would also like to know some suggestions on how I can manipulate it in such a way that I can work with it easily. The project is a viewer of meteorological variables, the TOC information must be added dynamically

0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

Hi @DiegoOspina, thank you for posting here. These are great questions, but I think you would benefit from first going through one or more tutorials to get a feel for the JS SDK fundamentals:

https://developers.arcgis.com/javascript/latest/tutorials/change-the-basemap-style/

https://developers.arcgis.com/javascript/latest/tutorials/add-a-feature-layer/

And here is an example of our LayerList widget, which is similar to the TOC you described.

https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist-actions/

 

 

0 Kudos