Layer Focus Button - Custom Experience Builder Widget

1924
6
03-05-2025 09:58 AM
Labels (2)
RasterFan98
New Contributor

Here is a simple custom widget: in the settings panel you can choose a map and a layer, and then the UI of the widget is a single button that when clicked will turn that selected layer on and all other layers off. It is not extensively tested, so use at your own risk and please post if you make any improvements to it.

 

6 Replies
JeffreyThompson2
MVP Frequent Contributor

@RasterFan98 Congratulations! Your widget was used as an example in the Plenary session at DevSummit.

GIS Developer
City of Arlington, Texas
AlderMaps
Frequent Contributor

I saw it in action and came here hunting for it and/or other similar custom or ootb tools. Very cool!

0 Kudos
TD1
by
Frequent Contributor

@RasterFan98 can it turn 2 layers on and 2 layers off at the same time. More of a toggle?

0 Kudos
TheRrrr42
Occasional Contributor

If you do some small edits to the bookmarks widget, like turning the map pan to false.  You can turn the widget into something that flips multiple layers on and off.

0 Kudos
RebekahPolette
Occasional Contributor

Hi, where is this option to turn the map pan to false? 

 

0 Kudos
SunshineLuke90
Occasional Contributor

If you're looking for a custom widget to toggle between groups of layers, my "A better layer switcher" (ABLS) widget might be what you're looking for. You can find it on my GitHub here, or on NPM here, which you can install into your Experience Builder installation using the CLI that I've built, documentation here.