Set certain map layers to be off on page load

217
4
Jump to solution
04-22-2024 11:25 AM
pw4
by
New Contributor II

I have a map in my Experience. How can I set certain layers to be toggled off when the page loads? E.g. I have layers A, B, C, and when someone opens the page, only A should be visible. The user can then toggle B and C on if they want. 

I've tried the "Customize layers" option of the Map Layers widget, but that removes the layers entirely, which is not what I want. 

0 Kudos
2 Solutions

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

Many of the map customization options in Experience Builder are handled indirectly through the Web Map Viewer. This is one of those. In the Layer List of the webmap, turn off the visibility of the layer and your choice will be respected by Experience Builder. In ArcGIS Online, you will need to hover over the layer you want to turn off and click the eye that appears. (This will look a little different in ArcGIS Enterprise.)

JeffreyThompson2_0-1713811259366.png

 

GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
HollyTorpey_LSA
Occasional Contributor III

Experience Builder should honor the layer visibility of your web map, so if you turn off layers B and C in your web map and save it, you should only see layer A next time you reload the Experience Builder app. Then if you've enabled the layer list for the map (toggle on "Layers" under Tools in the map settings in EB), you and your users can use that to turn layers on and off if desired.

- Holly

View solution in original post

0 Kudos
4 Replies
JeffreyThompson2
MVP Regular Contributor

Many of the map customization options in Experience Builder are handled indirectly through the Web Map Viewer. This is one of those. In the Layer List of the webmap, turn off the visibility of the layer and your choice will be respected by Experience Builder. In ArcGIS Online, you will need to hover over the layer you want to turn off and click the eye that appears. (This will look a little different in ArcGIS Enterprise.)

JeffreyThompson2_0-1713811259366.png

 

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

That does the trick, thanks!

0 Kudos
HollyTorpey_LSA
Occasional Contributor III

Experience Builder should honor the layer visibility of your web map, so if you turn off layers B and C in your web map and save it, you should only see layer A next time you reload the Experience Builder app. Then if you've enabled the layer list for the map (toggle on "Layers" under Tools in the map settings in EB), you and your users can use that to turn layers on and off if desired.

- Holly
0 Kudos
pw4
by
New Contributor II

That works, thanks!