Show Results in the Geocortex Viewer for HTML5

The Show Results activity takes any feature, collection of features, or feature set that exists in the workflow, converts it to a feature set if necessary, adds the feature set to a collection, and displays the features. If the collection already exists, you can combine the feature set with an existing feature set, provided the features are from the same layer.

The Geocortex Viewer for HTML5 displays results in a list in the side panel by default (). The geometries are highlighted on the map (). In the screen capture, the state of Montana is highlighted a different color because the user is hovering the pointer over Montana in the Results list ().

Features displayed using the Show Results activity, shown in the Geocortex Viewer for HTML5

The Geocortex Viewer for HTML5 offers many additional functions for working with results:

 

View Feature Details - Clicking a particular feature in the Results list zooms the map to that feature and displays details about the feature, including the feature's attributes. To return to the Results list, the user clicks the close icon .

Panel Actions Menu - The Panel Actions menu offers functions that operate on the features in the Results list, such as exporting or saving the features. The Panel Actions menu also has an option to switch between list view and table view.

Feature Actions Menu - The Feature Actions menu offers functions that operate on a particular feature in the Results list, such as buffering the feature or removing the feature from the list.

Collection Panel - The Geocortex Viewer for HTML5 supports multiple feature sets in a collection. Clicking the icon to go to the previous panel shows the feature sets in the collection. The Results Actions menu () has functions that operate on the feature sets, such as combining feature sets.

The Show Results activity fulfills the same purpose in Geocortex Workflow as the Select Features activity fulfills in Geocortex Essentials Workflow.

Configure the Show Results Activity to Run in the Geocortex Viewer for HTML5

To configure a Show Results activity, you must configure the Features input, which specifies the features to show. You will configure additional inputs. The particular inputs you configure depend on your scenario. The main factors that determine which inputs to configure are:

Inputs Supported by the Geocortex Viewer for HTML5

The Geocortex Viewer for HTML5 supports all of the Show Results activity's inputs:

Example 1 - Format Features Using the Show Results Activity’s Inputs

This example shows you how to use a Show Results activity to display the features returned by a Query Layer activity when the Show Results activity does not have access to the layer's configuration. Because the Show Results activity does not have access to the layer, the geometries are displayed on a graphics layer created for that purpose.

This example assumes that you already have a Geocortex HTML5 viewer that you can use to run the workflow. To demonstrate conclusively that the Show Results activity uses the formatting configured in the activity, rather than the formatting in the layer’s configuration, the layer should not exist in the site.

Workflow Logic

The workflow has the following activities, in the order shown:

To format and show query results that are displayed by a Show Results activity:

  1. Open Workflow Designer.

  2. In a new, blank workflow, add the following activities and connect them in the given order:

  3. Query Layer (query1): Configure the inputs:

  4. Show Results: Configure the inputs:

  5. Press Ctrl+S to save the workflow.

  6. Configure your viewer to run the workflow.

    See Host and Run Workflows in the Geocortex Viewer for HTML5 for information.

  7. Launch or refresh the viewer and run the workflow.

    The features listed in the Results list are formatted using the formatting configured in the Show Results activity.

Example 2 - Format Features Using the Layer’s Existing Configuration

In this example, the features come from a Query Layer activity that is configured the same as the Query Layer activity in Example 1. In this example, however, the layer that the features belong to exists in the map. The Show Results activity is configured to take advantage of the layer's configuration:

Workflow Logic

The workflow has the following activities, in the order shown:

If you want to try this example, configure the following site and viewer:

  1. Create an empty site.

  2. Add the Open Street Map basemap: Click Add Map Service, search for Open Street Map, and click Add to Map.

    The map service's ID should be 0. The ID is given on the map service's Details tab.

  3. Set the layer's Feature Label to: State Name: <i>{STATE_NAME}</i>

  4. Set the layer's Feature Long Description to:

    Population: <i>{POP2007}</i><br />
    Area: <i>{SQMI} sq.mi.</i>

  5. Add the following layer to the map: https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3

    This is the URL for a layer of US states. The layer's ID is 3.

  6. Add an HTML5 viewer.

To use the viewer's configuration to format query results that are displayed by a Show Results activity:

  1. Open Workflow Designer.

  2. In a new, blank workflow, add the following activities and connect them in the given order:

  3. Query Layer (query1): Configure the inputs:

  4. Show Results: Configure the inputs:

  5. Press Ctrl+S to save the workflow.

  6. Configure the viewer to run the workflow.

    See Host and Run Workflows in the Geocortex Viewer for HTML5 for information.

  7. Launch or refresh the viewer and run the workflow.

    The features in the Results list are formatted using the formatting configured in the layer's configuration.

Example 3 - Combine Feature Sets

This example shows you how to use a Show Results activity to combine the feature set with an existing feature set from an earlier Show Results activity. The features belong to a layer of US states returned by two Query Layer activities. The first query returns the 3 states in the Middle Atlantic region. The second query returns the 4 states in the East South Central region. The second Show Results activity combines the two sets of states using a union operation, resulting in a feature set of 7 states, which are displayed using the layer's configuration.

Workflow Logic

The workflow has the following activities, in the order shown:

If you want to try this example, follow the instructions in Example 2 to configure the site and viewer.

To combine feature sets using two Show Results activities:

  1. Open Workflow Designer.

  2. In a new, blank workflow, add the following activities and connect them in the given order:

  3. Query Layer (query1): Configure the inputs:

  4. Show Results: Configure the inputs:

  5. Delay: Set the Duration input to: 5000

  6. Query Layer (query2): Configure the inputs:

  7. Show Results: Configure the inputs:

  8. Press Ctrl+S to save the workflow.

  9. Configure your viewer to run the workflow.

    See Host and Run Workflows in the Geocortex Viewer for HTML5 for information.

  10. Launch or refresh the viewer and run the workflow.

    The features from both queries are displayed.

  11. Click the Go Back In Panel icon to go to the previous panel.

    The US States collection contains a single feature set with 7 features.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.15