Skip to main content

Run command through HTML

Comments

9 comments

  • Permanently deleted user
    Hi Michael,

     

    You could use a (https://docs.geocortex.com/essentials/4.8/admin-help/Default.htm#ge/admin/configuration-methods-and-techniques.htm#embedding-viewer-commands-in-hyperlinks) command hyperlink like this: <a href="command:ActivateView?LayerListView">Bring back my layer list!</a> ShowLayerList would also work, for now, but it's been deprecated.

     

     
    0
  • Permanently deleted user
    Jordan - thanks so very much!!!

     

     
    0
  • Permanently deleted user
    Happy to help!
    0
  • Permanently deleted user
    Hi Jordan,

     

    Recently I tried to include a command as mentioned above into HTML of Home Panel. But when I am clicking it in viewer I am getting an error "The specified command "OpenAndFocusToolbar" has no associated metadata." in the client's debug log. Can you help point out what the problem is..!

     

    Thanks,

     

    Shubham
    0
  • Permanently deleted user
    Hi Shubham,

     

    Unfortunately, the error "The specified command _____ has no associated metadata" means that you can't run that command from a command hyperlink until we add the necessary metadata to the viewer.  I will try to get that done for an upcoming release but I am not sure when that might be available.

     

    As a workaround, you can run a workflow that uses a Run External Command activity, which is not ideal but will let you use that command in turn.

     

    Regards,

     

    -Malcolm
    0
  • Permanently deleted user
    Hi Malcom,

     

    Thank you very much for the information you provided. I was trying to implement this after having a look at it in the home panel of LA County demo site (http://gedemo.geocortex.com/Html5Viewer/index.html?viewer=LA_County_.LA_HTML) .

     

    However, while running it in the demo site I checked the network trace and I didn't find any request to run a workflow going to the server side after clicking the hyperlink. Can you tell how it is implemented in the demo site?

     

    Thanks,

     

    Shubham
    0
  • Permanently deleted user
    Hi Shubham,

     

    In the LA County demo site, we use the ToggleToolbar command to open the toolbar, rather than the OpenAndFocusToolbar command: <a href="command:ToggleToolbar">toolbar</a> There is a copy of the LA County sample site in your installation of Essentials, in the Sample Sites folder.  Assuming our demo map services are still running, you can copy that site folder into your own Sites folder and load the sample site in Essentials Manager to see how it is configured.

     

    Regards,

     

    -Malcolm
    0
  • Permanently deleted user
    Thank you for the information Malcolm. I will have a look at the site.

     

    - Shubham
    0
  • Mike Diss-Torrance
    I built a custom command in JavaScript and I 'm getting the error ("The specified command _____ has no associated metadata")  when I try to run that command from a command hyperlink.

     

     

    How does one add the needed metadata to custom command?

     

     

    BTW: It works great when run as tool from the toolbar, within the context menus, or launched from within a workflow.

     

     
    0

Please sign in to leave a comment.