Skip to main content

How to set identifable layers in workflow

Comments

11 comments

  • Permanently deleted user
    Hi Dori,

     

    My colleague Alejandro and I looked into this, and have a solution for you, but it's a little odd.  Basically, you cannot "toggle" the identifiable property on if it's set to the off position in Manager.  But if you have set a layer to be identifiable in manager, you are able to turn it off (and then back on)!  So here's what you do:

     

    1) Enable identify on all your layers that you want to be identifiable in Manager.  This includes any situational layers that you may want to toggle on later using a workflow.

     

    2) Create a new workflow that starts with a "DisableAllLayersForIdentify" command.  This will shut off all the layers for identification.  

     

    3) After this command, you can use the "EnableLayerForIdentify" command, with the following command parameter, for any layers that you want to be identifiable by default (Make sure to substitute the layer ID and the Map Service ID for the values for your service):

     

    Newtonsoft.Json.Linq.JObject.Parse("{layerId: '3',mapServiceId:'0'}")

     

    4) Add this workflow to your site, and set it to run at startup.  

     

    5) Now you can enable or disable your layers using the same syntax in other workflows (as long as they were enabled in manager)

     

    Does that make sense?  Please let me know if you have any questions!

     

    Thanks,

     

    Danny
    0
  • Permanently deleted user
    This has been published to the Geocortex Essentials Code Gallery as well:

     

    https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_SEARCH_RESULT&id=kA460000000PJNI  
    0
  • Permanently deleted user
    Hi Daniel,

     

    This works out great for my purpose!! Thanks a lot!

     

    I am pretty new to workflow syntax and I am wondering how may I tweek this syntax :

     

    Newtonsoft.Json.Linq.JObject.Parse("{layerId: '3',mapServiceId:'0'}")

     

    to include multiple layer id, e.g. layerid = 3, 4, 5, 6, 7.

     

    Best regards,

     

    Dori
    0
  • Permanently deleted user
    That's great Dori, I'm glad it helped!  To activate multiple layers, you wouldn't use the same workflow activity with multiple layer IDs, but different activities, with the same command; one for each layer ID that you want to toggle.

     

    Cheers!

     

    Danny
    0
  • Permanently deleted user
    That works like a magic! Thanks a lot Danny and your team for your speedy responds!!

     

    I am also wondering if there is any online resources for geocortex especially workflow designer that gives more examples of syntax or more systematic tutorials for workflows. Right now I rely heavily on the support center and code gallary. But I am looking for places where I can self learning more workflow tricks. Please do advice.

     

    Best regards!

     

    Dori

     

    Dori
    0
  • Permanently deleted user
    Hi Dori,

     

    Right now the support center is the best resource for workflow tips, tricks, and examples.  We don't have a list of examples unfortunately, however one other resource that often gets overlooked is the built in help system in workflow designer.  You can right click on any of your activities in the activities toolbox and select "Help" for a detailed explanation of the activity.

     

    If you can't find what you're looking for in there, you can always post in the community, just like this!  Members of the Latitude Geographics team monitor the forums whenever we can, not to mention other users of the software, who have excellent suggestion as well!

     

    I hope this helps!

     

    Thanks,

     

    Danny
    0
  • Permanently deleted user
    Good to hear! Thanks again Danny!
    0
  • Zack Robison
    Danny!  I just stumbled across this for an issue with identify (which is resolved now thank you) but I must express my desire to see this "LayerDescriptor" object used for more viewer commands.  I ultimately made a modification to the js for an html5 viewer so that the resymbolization tools could take an object which is literally the exact same thing so that a client could have control over that functionality in a workflow... could you spread it around that this object exists and that at least one of us would like to take more advantage of it accross the viewer commands?
    0
  • Permanently deleted user
    Hi Zack,

     

    I'd suggest posting your suggestion in the Ideas section of the support center.  The product owners and developers monitor that section closely, and it's the best way to make your suggestion heard!

     

    Thanks,

     

    Danny
    0
  • Bryan Lynn
    Hey Danny,

     

    Thanks for the exmple - this was a much needed addition.

     

    However, I have the exmple working with multiple layers the way I need it to but it is does not toggle the check mark in the "Identifiable Layers" panel correctly.  So, I clear all the layers and enable the 3 I want by default but as soon as I open the "Identifiable Layers" panel everything is turned back on.  Is there a way to fix this?

     

    Thanks again.
    0
  • Permanently deleted user
    Hi Bryan, 

     

    This is a known bug, "GVH-8552: Layer selector commands do not update layer selector UI".  Unfortunately there aren't any known workarounds.  I'll include a link to this discussion on the bug report.
    0

Please sign in to leave a comment.