Select to view content in your preferred language

Buttons that select pre set layer groupings ? Combined views?

1631
7
Jump to solution
12-01-2023 09:09 AM
KitKat94
New Contributor II

I have a map in experience builder that has many layers. 
I am wondering if there's a way I can have a button at the top of the app that would turn on a specific group of layers for example:

Button 1. "Administrative" and this would turn on the layers: City boundary, parcels, regional boundary, census dissemination areas etc.

Button 2: "Forestry" and it would turn on: Timber permits, logging roads, etc.

I know I can make layer groups. But I am hoping to have buttons at the top of the page that would automatically turn on these pre set layers groupings. 

Is this possible? I tried with views but I can only figure it out for one layer at a time, not many layers at the same time.

0 Kudos
2 Solutions

Accepted Solutions
TimF
by
New Contributor III

@KitKat94 If you can compromise on the 'button' element of this, then the Bookmark widget in Experience Builder allows you to configure your own bookmarks - including which layers are visible for each bookmark. This is the easiest method to getting close to what you're after. The compromise is two-fold:

1. Bookmark 'buttons' are not as flexible or configurable as standalone buttons. There are different bookmark styles, but none of them are very small. The most light-weight is a vertical list. A horizontal list at the top of the page probably won't work. Have a play around and you'll see what I mean...

2. Bookmarks specify a geographic extent. When you set them you'll need to work out what is a sensible extent. Some users may expect to activate the layers and retain their current location. These users will be disappointed when the bookmark pulls them out to the full map extent, but we can't keep everyone happy!

I actually can't find another way to get exactly what you're after without creating duplicate copies of the map itself and setting the correct layers to be on in each one. Then having multiple views referencing each separate map. Then having buttons linking to each view. That seems like a lot of work, so I'm probably missing a middle-ground option.

What would be really useful however would be for ESRI to add the option to connect a Button to a bookmark, as currently it is only page, window, view etc. This would make this workflow very clear.

 

View solution in original post

JeffreyThompson2
MVP Regular Contributor

That does not appear to be an option. (Unless you have Developer Edition, then you could hide them with css.)

GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
7 Replies
JeffreyThompson2
MVP Regular Contributor

Five Ways to Handle Groups of Layers

The Use Multiple Maps with the Section Widget method or maybe the Hack the Bookmarks Widget would be closest to what you want.

GIS Developer
City of Arlington, Texas
KitKat94
New Contributor II

Thanks for that link! Those are super useful workflows to know. 

0 Kudos
TimF
by
New Contributor III

@KitKat94 If you can compromise on the 'button' element of this, then the Bookmark widget in Experience Builder allows you to configure your own bookmarks - including which layers are visible for each bookmark. This is the easiest method to getting close to what you're after. The compromise is two-fold:

1. Bookmark 'buttons' are not as flexible or configurable as standalone buttons. There are different bookmark styles, but none of them are very small. The most light-weight is a vertical list. A horizontal list at the top of the page probably won't work. Have a play around and you'll see what I mean...

2. Bookmarks specify a geographic extent. When you set them you'll need to work out what is a sensible extent. Some users may expect to activate the layers and retain their current location. These users will be disappointed when the bookmark pulls them out to the full map extent, but we can't keep everyone happy!

I actually can't find another way to get exactly what you're after without creating duplicate copies of the map itself and setting the correct layers to be on in each one. Then having multiple views referencing each separate map. Then having buttons linking to each view. That seems like a lot of work, so I'm probably missing a middle-ground option.

What would be really useful however would be for ESRI to add the option to connect a Button to a bookmark, as currently it is only page, window, view etc. This would make this workflow very clear.

 

KitKat94
New Contributor II

That is a great suggestion about the bookmarks.  By using your suggestion and the "list" style template its pretty close to what I wanted! Only wish I could have the buttons distributed horizontally, but I might be able to customize that. 
Thanks!

KitKat94_1-1701460837189.png

 

 

0 Kudos
JeffreyThompson2
MVP Regular Contributor

If you select one of the Advanced Templates, you can fully customize the appearance of the bookmarks, including the direction.

JeffreyThompson2_0-1701461583134.png

 

GIS Developer
City of Arlington, Texas
0 Kudos
KitKat94
New Contributor II

That is helpful thanks! However do you know if there's a way to remove those arrows? Otherwise I think they have no function when the bookmarks are spread out.  I'm just hoping to have my four groups displayed so when the users (who aren't familiar with ESRI products) open the application they can see the four options. 

KitKat94_0-1701463451951.png

 

0 Kudos
JeffreyThompson2
MVP Regular Contributor

That does not appear to be an option. (Unless you have Developer Edition, then you could hide them with css.)

GIS Developer
City of Arlington, Texas
0 Kudos