Select to view content in your preferred language

ArcGis Explorer: How to turn all layers off/on?

2005
2
07-20-2010 03:53 AM
RobertBuckley
Occasional Contributor
Is there a way to turn multiple layers on or off? I have a group layer with 110 seperate layers. I want to load the layer with the layers turned off to save loading time. When I have zoomed in to a particular area I want to turn all layers of.

There must surely be a way to do this?

Thanks for any help.

Robert
0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor
Robert,

Checking and unchecking the checkbox of the Group Layer (presumably added as an ArcGIS Layer File or Layer Package) will control the visibility of all layers within that group. The individual layer checkboxes will not change status - this is designed to indicate exactly which Layers will be affected when the user changes the visibility at the group level.

If this is a layer which will be frequently used in your Explorer sessions - and particularly if you are intending to deploy it to a user base via an Application Configuration - you could also consider writing an Extension Add-In which would search the map contents for this layer by name then set the visibility as appropriate. This would obviate users turning the visibility of all layers on then saving the map and closing - only for them all to be redrawn when the map loads next time.

Regards

Mike
0 Kudos
ShellyGill2
Regular Contributor
I have written a simple add-in that allows you to change layer visibility - it should work on all layers in the map, regardless of what kind of layer, and whether the layer is in a group or top-level in the Contents. I've been having trouble with attachments to the forum, so have shared the compiled EAZ on ArcGIS.com here:
http://www.arcgis.com/home/item.html?id=dfb3353c3aff4463b6e0016158b7dac2

Let me know if you needed the source code though.
0 Kudos