1

Does anyone know a way in ArcGIS Web AppBuilder Developer edition that I can create a button or a link that turns certain layers on or off?

For example, if I have three layers

[1] Homes
[2] Rivers
[3] Zip Codes

and I want to create a button that turns on layers [1] and [3], so that the user only has to click once to do this instead of twice.

(In reality, there are more like 20 layers, so the time savings would be significant)

1 Answer 1

5

The Layer Toggle Button widget is designed to do precisely that.

This is just a simple widget to toggle a configured layer(s) on and off using a button. The layer(s) can be a whole map service layer or a specific sublayer(s) in a map service. This widget will sync with the LayerList widget. You can add multiple instances of this widget to onscreen place holders or in a widget controller like the Header controller in the Foldable theme.

See it in action here: https://gis.calhouncounty.org/wab/v2.14/widgets/LayerToggleButton/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.