I have an online map with 6 layers. One layer represents cities (City layer A). Two other layers, County Layer A and State Layer A, correspond to the City Layer A. I would like County Layer A and State Layer A activated whenever a user activates City Layer A. I also have another city layer (City Layer B) that has two corresponding layers, County Layer B and State Layer B. I would also like it so when a user activates City Layer B, County Layer B and State Layer B activates. Even better, I'd like it so when a user activates one city layer, the other city layer (and in turn, the other county/state layers) turn off.
Is this possible?
Thank you!
Iclei Usa, you can achieve this however, this is something not possible with out of the box application but has to be a custom web application where you can control the layers visibility with conditions provided. You can refer to the layer visibility sample
Toggle layer visibility | ArcGIS API for JavaScript 3.33
or
MapImageLayer - Toggle sublayer visibility | ArcGIS API for JavaScript 4.16
Hope this helps.
Cheers!
Manish