Check boxes to toggle layer visibility
I need a simple workflow that presents the user with a list of checkboxes that will toggle individual layer visibility for certain layers on the map. Does anyone have an example workflow that does this or something similar? Thanks in advance :)
0
-
Rebecaca,
there are various ways. Here is what I would like to implement.
1) Log on the Geocotex Essential Manager, edit Site,
2) Edit a layer, and Add a Property whose name as 'DynamicVisibilityLayer' something similiar you want to call, and set value 'true' or something similar.
3) repeat step 2 as many as layer you want to choose for the list of layers you want to use in the Form later with the checkboxes. Step 1 to 3 will modify your Site.xml where <Property Name='DynamicVisibilityLayer' Value='true'/> to all layers you set up on step 2 and 3 when you see the Site.xml
4) Create a new workflow
4-1) Add 'Get Layer Info By Property' activity and set PropertyName argument as 'DynamicVisibilityLayer' which you choose on Step2 above, and which activity returns 'Layers Info List with EssentialLayerInfo data type.
4-2) Loop through the result of step 4-1 and built your dataItem for the checkbox for the Form. The dataItem value will be 'MapServiceId' and 'Id' from 'EssentialsLayerInfo' and DisplayName will be 'Name'. NOTE Step 4-1 and 4-2 can be done various ways such as (1) hardcoded list of DataItem, or use 'GetLayerList Item Info' activity or this example etc
4-3) Add DisplayForm, where add CheckBox whose input will be from step 4-2, and add button
4-4) Final activity you need to use 'SetLayerVisibility' which requires 'MapServiceId' or one of LayerId or LayerName, and Visibile. All previous steps are to get 'MapServiceId' and LayerId/Name to set visibility. So you may need to parse the selected Checkbox object to get MapServiceId and LayerId with any Delimiter you might introduced on step 4-2.
This pesudo implemenation is assumed you want to use only workflow and Site configuration.
Wish this to give your start point and the idea how to approach.
Munhwan0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar