Skip to main content

Determining current layer theme

Comments

10 comments

  • Permanently deleted user

    Not sure if I'm being obvious, but you can set the layer theme by using the external command within Workflow: "SwitchToLayerTheme" and supplying the Theme ID as the command parameter.

    You might structure your workflow to switch to a particular theme and turn layers on/off with the "Set Layer Visibility" activity.

    0
  • Permanently deleted user

    I know there is a way to set the layer theme, what I want to know is if there is way to get the current displayed layer theme.

    For example, 

     

    If I had a workflow that has a parcel query tool in it or a add feature tool, and if a user clicked it when they werent in the appropriate layer theme, it would give them a message saying that your in the wrong layer theme to use this tool. 

     

     

    0
  • Permanently deleted user

    Chris,

    +1 from me.

    Did you ever figure out if this is possible??  This would be a very useful command.  I am facing the same problem and would like to check that the user has the correct layer theme on prior to starting a particular workflow.

     

    thanks Ben

     

    0
  • Permanently deleted user

    Ben, 

     

    Still did not figure out this problem.  What is available now is get layer visibility, and it could be used as the same if you could do it that way. 

     

      

    0
  • Permanently deleted user
    Anyone has figure out this problem? We have multiple themes and checking visibility of all layers if not practical.
    0
  • Permanently deleted user
    Just found answer to my question. LayerTheme events are documented . 

     

    User-added image
    0
  • Permanently deleted user
    I don't want to wait for an event, but just want to get the current layer theme. How to do this?
    0
  • Permanently deleted user
    I don't think there is no direct way from the OOTB currently other than above suggestion, and without little custom code.

     

    You may implement the client command to get it from your implementation,and excute your command from your workflow.

     

    Your command implementation will be few lines to get by app.site.essentialsMap.layerThemesInfo.activeTheme.displayName (or id) where app is geocortex.essentialsHtmlViewer.ViewerApplication
    0
  • Permanently deleted user
    Thanks. The same thing for Silverlight?
    0
  • Permanently deleted user
    Nope. my posting above is about GVH only. The client custom command implentation should be done each viewer for GVS and GVH differently but similary with the same command name.

     

    The custom commands can be accessed through .zap file for GVS, while with .js (custom library) for GVH.

     

    For GVS, I think you can get the current active layer theme from Site.EssentialsMap.LayerThemesInfo.Active.ID or Site.EssentialsMap.LayerThemesInfo.Active.DisplayName
    0

Please sign in to leave a comment.