Hide some layers from the layer tree on page load
Hi,
We are using the Geocortex essentials manager to publish sites with pre-configured sets of layers. However on the page load, we have a requirement that we should be able to hide/show a set of given layers from the layer tree. How can we achieve this using Geocortex Essentials Manager ?
0
-
You can utilize "Layer Themes" in your application. Setup some layer themes in Manager, then can access that layer theme thru the layertheme URL parameter. Page 42 of the GVH 2.6.1 Administrators and Developers Guide uses these two examples.
http://MyServer.com/Html5Viewer/Index.html?layerTheme=0
or
http://MyServer.com/Html5Viewer/Index.html?layerTheme=Imagery
Regards,
Rick0 -
Hi Richard,
Thanks for your answer. We have a lotr of layers and we want to have dynamic configurations, so it could be any n layers from the complete list. Unless we have a way of dynamically creating themes, i think that we will not be able to proceed with using themes.0 -
Hi Aiden,
I guess similar issue we encountered and fixed it by geocortex security settings / permissions for specific layers - show or hide.0 -
Can not do permissions "dynamically" and last I heard, they can slow HTML5 sites...
Alden, can you describe a bit more what you are trying to do? How would you want to implement this dynamic configuration? At startup? based on what?0 -
I don't understand why this has to be dynamic, but I would guess that certain users have certain needs? If that is the case, I think that you have three options:
1) Use themes. I'm not sure whether or not you realize that users can switch among themes within a viewer, but they can and this is the fastest way for a user to make big changes to the layer list as needed.
2) Use permissions. If you want to be the decider of what users can and cannot do, then this is the strongest way of doing that. You can set permissions by user or role, including access to themes.
3) Use a workflow. This would expose the functionality to users such that they can turn layers on and off as desired. The activity for this is "Set Layer Property" with the property being "IncludeInLayerList". You start by filling an ilist<DataItem> with all of the layers in the map, I'm not sure how you'd want to fill it I suppose that depends partially on your map since I don't know a good way to iterate over the LayerList. Then, pass the list to a DisplayForm ListBox and have users select as many as they want to change. Finally, write the logic to turn each layer in their selection off/on depending on the button that they press. Should be pretty simple, though somewhat time consuming, and would provide the ability for your users to turn on/off all layers at will.0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
5 kommentarer