Skip to main content

How can I make the time slider visible only when the time aware layer is turned on?

Comments

3 comments

  • Permanently deleted user
    You can set it to not be active by default (user has to turn it on), but I don't know of a setting for it to activate on layer toggle on.  This is better than it being on all the time, but not as good as what you are asking for.User-added image
    0
  • Justin Kraemer

    Yes, thanks, Jamie. I am aware of being able to set it to be inactive at first. I have it that way on the tablet config, but am hoping I can do same on the desktop config, too, because of its uselessness until the time-aware layer is turned on. What I am hoping for is that there is an event that fires when a layer is turned on. If so, I will set up a listener for the archive layer. I cannot find a list of GVH events that can be listened for. Can someone direct me to that, please?

     

    Thanks,

     

    Justin
    0
  • Justin Kraemer

    I found a solution.

     

    I had already set up the time slider to toggle on and off from the toolbar toggle button, as I learned to do from the Amanda Frech reply in this post (https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=90660000000CjulAAC) . But today I modified the toggle button to replace the command ActivateTimeSlider and the the command DeactivateTimeSlider with the command RunWorkflowById.

     

    The command parameter for Toggle On that had been empty for ActivateTimeSlider is now the name of the workflow I created with two RunExternalCommand activities. First is SwitchToLayerTheme, with the "Archive" theme name as its parameter. I only just today made this theme, specifically for the purpose. Second is ActivateTimeSlider with no command parameter. To illustrate:

     

    The workflow showing DeactivateTimeSlider and SwitchToLayerTheme as two RunExternalCommand activities

     

    The command parameter for Toggle Off that had been empty for DeactivateTimeSlider is now the name of the second workflow I created with two RunExternalCommand activities. First is SwitchToLayerTheme, with the "All Available Layers" theme name as its parameter. Second is ActivateTimeSlider with no command parameter. To illustrate:

     

    The workflow showing DeactivateTimeSlider and SwitchToLayerTheme as two RunExternalCommand activities 

     

    This works perfectly and I recommend it highly.

     

    Cheers,

     

    Justin
    0

Please sign in to leave a comment.