Layer Toggle Button Widget Version 2.14 - 01/13/2020

File uploaded by rscheitlin Champion on Aug 1, 2016Last modified by rscheitlin Champion on Jan 13, 2020
Version 12Show Document
  • View in full screen mode

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.


Live Preview Site


List of the latest enhancements and changes:

  1. Fixed issue with group layers in 2.12 WAB.


List of Previous changes:


  1. Fixed issue with basemap being toggled when exclusive mode is used in 2.12 WAB.
  2. Full support for using this widget in the Launchpad themes Anchorbar controller is now supported.
  3. There is now an exclusive mode for the layer toggle. Meaning that all other layers will be toggled off if the layer is exclusive. Caution should be used when choosing this mode.
  4. There is now a zoom to layers extent option for the layer(s) toggles.
  5. There is now a event that can be listened for when a layer is toggled on. The event name is 'toggleChanged'.
  6. Widget now indicates the toggle state of the layer using the background color of the button.
  7. You can follow the directions in the downloads readMe.txt to set the initial state of the button to be toggled on.
  8. Now the widget support toggling multiple layers.