Aller au contenu principal

How to highlight a feature in Mobile from a workflow

Commentaires

3 commentaires

  • Phil MacIntyre

    Hello Berend. This is Phil MacIntyre, one of the QA people on the Geocortex Mobile team. I was able to get the Run Command activity to work with the highlights.add operation in a very simple Workflow (JSON is attached). This setup is used as a feature action to apply highlights to the feature which you have selected, very similar to the sample commands to add or remove highlights in Designer, but accomplishing the same thing via Workflow. Hopefully this will help guide you in the right direction to solve your problem, but if it doesn't, please let me know and provide a bit more info about what you're trying to accomplish and we'll troubleshoot further. Thank you!

    0
  • Berend Veldkamp

    Thanks,

     

    How would I do this if I have no workflow inputs?

    My use case is to search for a feature (using a Query Layer), and then I want to highlight the resulting features.

    0
  • Phil MacIntyre

    Hi again Berend,

     

    I have 2 suggestions for you which may prove useful.

     

    1. If you want a very quick and easy solution, you can make use of the 'Show Results' activity and link your Query Layer results to that. The Show Results activity hijacks the built-in GXM Search component, so it will populate the search panel with your query, and automatically apply highlights to the selected features. As of our 5.8 release, we added in full support for the 4 'Combine Mode' parameters for that activity (Union, Intersect, Subtract, Replace) so you can leverage multiple queries into one final result.
    2. If you want to apply a highlight without the Workflow inputs, say via a Workflow launched from the I Want To Menu, you need to take a number of steps to get all of the pieces that would otherwise be provided by the Get Workflow Inputs activity. In brief, you need to use the Query Layer activity to set up your query. Then use the Get Layer activity on the same to get the ID value/s of the layer. Next, run the Get Map activity to get the relevant extent. Next, user the Create Value activity to create an empty array. Then, the Create Feature Set activity to take the feature/s from your Query Layer and put them into a set we can work on. Follow that with an Add Items activity, to load the feature set into the array. Follow this with a Run Operation using the 'results.from-graphics' operation, utilizing the parameters from Query Layer, Get Layer, and Get Map. And then finally feed that Run Operation's results into the Run Command activity to utilize the highlights.add command. I'm attaching another simple sample Workflow which has this pattern laid out utilizing some of my sample test data, so you can just adjust it to target your own.

     

    The second method is obviously a bit more complicated, but that's the route you'll want to go if you don't want to utilize the search results panel.

     

    Please give that a try, and let me know if you have any further troubles.

    -1

Vous devez vous connecter pour laisser un commentaire.