Hoppa till huvudinnehållet

Run a Global Search with a URL

Kommentarer

7 kommentarer

  • Tom Neer
    Yes. Create a Workflow (e.g. globalsearch) with a string input parameter (e.g. inQuery). Drop in a RunExternal Activity, set the Command Name to "GlobalSearch" and the Command Parameter to "inQuery". Publish the Workflow. You would call the workflow using the following URL: "https://YourDomain/HTML5/?viewer=YourViewer&run=globalsearch&inQuery=SearchText"
    0
  • Dan Giersz
    Thanks, Tom.  I guess I should have asked a better question because I was hoping there was a way to run viewer commands via URL and not have to create a workflow.  This is probably as simple of a workflow as you can create, but that is how lazy I have become...
    0
  • Tom Neer
    There is really no reason why that command is not exposed as a URL Parameter. It's as simple as it gets. But AFAIK it has not been exposed.
    0
  • Dan Giersz
    That actually didn't work.  Gives an error about not being declared possibly due to inaccessibility.

     

    But on a lighter note, I created a RunExternal activity workflow that has arguments for both the command and the command parameter.  Now I can run any viewer command I want from a URL! Well, except for GlobalSearch.
    0
  • Dan Giersz
    I actually can run the GlobalSearch from my viewer command workflow.  It acts really weird, though.  It would run just fine, but none of the services would draw in the map.  Pushpins and results list showed up, I could even select a result and it would zoom in and show the highlighed geometry. But still no services displayed. Or it wouldn't return all the results it normally does, like geocoding results.

     

    I put in a delay so the workflow waits 5 seconds before running the search and then it worked fine.  I guess the global search was running too soon in the intialization of the site.
    0
  • Permanently deleted user
    Hi Dan, How did you put the 5 second delay? would you please share more detail? 
    0
  • Dan Giersz
    Common Client task: ExternalDelay
    0

Du måste logga in om du vill lämna en kommentar.