Toggle layer visibility
For ease of use by non-techies, I would like to create a workflow that toggles a set of layers on and off. The Set Layer Visibility task takes care of setting the visibility, but how does one get the layer's visibility property? Any examples would be appreciated.
Dave
-
I have a similar need on a couple of sites and used the Layer Themes to accomplish basically the same thing. Is that an option for you?
0 -
That's a good idea Steven. Setting up layer themes and changing them via buttons using the SwitchToLayerTheme command would get me most of the way there.
I'd still like to learn to do it via workflow. Layer themes can be a bit heavy-handed at times with overriding what a user may have chosen to view.
0 -
Hi to all
I too would like to know this. See https://support.geocortex.com/Forums/Thread.aspx?pageid=0&mid=2&ItemID=20&thread=47016
Thanks
Ralph
0 -
Unless I am misunderstanding, you won't need to get the layers current visibility to achieve this. Which is good, because there is no way to read this from within a workflow. The Set Layer Visibility activity is not a toggle (as the previous command referenced in the linked forum post was) and takes a boolean (true/false) value depending on what you wish the visibility to be.
So you can fairly easily set up a workflow that turns a set of layers on, without worrying that you might actually be turning some of them off, and without turning off other layers that the user has selected at the same time.
0 -
Thanks Jonathan. That does answer my question, although it wasn't what I was hoping to hear.
I was hoping find the visibility of a set of layers, and toggle several others based on the visibility of that layer. Obviously I can do this through two buttons, but I was hoping to do this in a single button/workflow.
Dave
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare