Search By Route widget

The Search By Route widget allows you to search for a route or portion of a route and locate specific locations along it in a Linear Referencing System (LRS). You can use the widget to manage pipeline data with ArcGIS Pipeline Referencing and roadways data with ArcGIS Roads and Highways. You can find a route and zoom to a specific measure location using a variety of search methods. You can also use returned routes and locations in editing workflows with the Add Point Event and Add Line Event widgets.

Examples

Use this widget to support app design requirements such as the following:

  • You want to find the locations of specific measures along routes.
  • You want to find multiple locations of specific measures along routes.
  • Your organization needs users to be able to orient themselves along a route while performing LRS event editing and analysis tasks.

Usage notes

This widget requires connection to a Map widget. To search by routes, the Map widget must be connected to a web map data source published with an LRS with the Linear Referencing capability enabled. To view versions other than the default version, the web map data source must be published with an LRS with the Version Management capability enabled.

To create an LRS and publish a feature service with the Linear Referencing and Version Management capabilities enabled, follow the steps in the ArcGIS Pro documentation:

When you include this widget in an app, the widget panel provides users with the following options for searching for routes:

  • Method—Choose a search method.
    • Route and Measure—Search By Route ID. Optionally, you can also provide a measure value, multiple measure values, or a range of measure values by providing a single measure, multiple measures, or a measure range.
      • Route ID or Route Name—Provide a route ID or name for the route you want to search. If the network layer has route name configured as an identifier, this setting is labeled Route Name.
        Note:
        If an LRS network is configured with a multifield route ID, the fields that form the concatenated route ID appear. In this case, provide valid values for all route ID fields to search for a route.
    • Coordinate—Search by coordinates. Provide x-, y-, and, optionally, z-coordinates.
    • Referent—Search by referent event. A referent is a fixed location along a route that has a discrete measure value from which other locations are determined.
      • Referent—Choose the referent event that you intend to use for the search.
      • Referent Field—Provide a value for the identifier event referent field. This field is used to search for individual event features.
      • Offset—Optionally, provide an offset value. The offset is a fixed distance from a referent event; it can be positive or negative.
    • Network—The network layer that is used to search for routes.

Settings

The Search By Route widget includes the following settings:

  • Select a Map widget—Select a Map widget.
  • Load Layers—Load layers from the web maps in the connected Map widget. To load layers, the Map widget must be connected to a web map with LRS layers.
  • Clear Layers—Remove all loaded layers from the widget.
  • Layer Configuration—Click a layer to open the Layer Configuration panel.
    • Label—Provide a meaningful label for the layer. This label appears in the widget panel at run time.
    • Search methods—Choose a Default search method that you want selected when the widget first loads, and choose which search methods are available at run time. You must turn on at least one: Route and Measure, Coordinate, and Referent.
    • Search measures—These settings appear when you choose the Route and Measure search method. Choose which types of measure values users can search at run time. You must turn on at least one of the following options:
      • Single—Allow users to search for single measure values along routes.
      • Multiple—Allow users to search for multiple measure values along routes.
      • Range—Allow users to search for a range of measure values along routes.
    • Identifier—Configure the LRS network fields that will be used to search for routes. You can drag the fields to change their order and deselect fields to make them not appear in the widget panel at run time. For the default, choose one of the following options:
      • Route ID—The Route ID field that will be used to search the routes.
      • Multi field route ID—Fields that form the concatenated Route ID will be used to search for routes. Drag the fields to change the order and deselect the fields to not display them in the widget.
    • Spatial Reference—Set a spatial reference for the search. You can use the spatial reference from the map or from the LRS layers.
    • Search—Set a search radius.
    • Results—Add fields to sort results by field. You can make results sort in ascending or descending order.
      • Expand by default—Turn on this setting to make search results expand by default when the user performs a search.
  • Selection settings—Customize how routes appear when you search for them and select them.
    • Highlight—Choose a display color for the selection highlight. The default color is cyan (#00FFFF).
    • Width—Set the width of the selection highlight in pixels. The default width is 3.
    • Label color—Set the color for the route label. The default color is black (#000000).
    • Label size—Set the font size of the route label in points. The default size is 12.
  • Result settings—Configure the page size for search results, meaning the number of results that display per page. The default is 25 records.
  • Display settings—Choose which settings to display in the widget panel at run time and configure default settings that you want available in the widget when it first loads.
    • Hide Method—Hide the Method parameter from the widget panel.
    • Hide Network—Hide the Network parameter from the widget panel.
    • Default network—Choose the default network layer for searching for routes.
    • Default referent—Choose the default referent event for searching by referent.
    • Default Offset Units—Choose the default referent event offset units for searching by referent.

Search for routes by name or ID

Complete the following steps to search by route:

  1. Start Experience Builder. Sign in to an ArcGIS Enterprise portal.
  2. Add a Map widget. Connect it to a web map with LRS data published with the Linear Referencing capability enabled and, optionally, the Version Management capability enabled.
  3. Add a Search By Route widget. Connect it to the Map widget, then load the LRS layers from the map widget.

    Search by route

  4. If there are multiple methods configured in the widget settings, choose Route and Measure from the drop-down menu.
  5. If there are multiple networks configured in the widget settings, choose a network from the Network drop-down menu.
  6. Provide a route ID or name in the Route ID or Route Name text box.

    If the network layer has a route name configured as an identifier, this setting is labeled Route Name.

    Note:
    If an LRS network is configured with a multifield route ID, the fields that form the concatenated route ID appear. In this case, provide valid values for all route ID fields to search for a route.
    Note:

    You can use wildcard characters to search for routes. Wildcards are special characters that can stand in for unknown characters in a search value. The following characters are supported:

    CharacterDescription

    %

    Represents any number of characters.

    _

    Represents one character.

  7. Optionally, provide a measure value, multiple measure values, or starting and ending measure values to search for specific locations along the route.

    Note:
    Station values are also supported as input measure values.

  8. Click Search.

    If a valid route exists that fits the search parameters, it appears in the results pane. If only one result exists that fits the search parameters, the map highlights and zooms to that route. If more than one result exists that fits the search parameters, you can select a record in the results pane to make the map highlight and zoom to that route.

    Search results

Search for routes by coordinate

Complete the following steps to search by coordinate:

  1. Start Experience Builder. Sign in to an ArcGIS Enterprise portal.
  2. Add a Map widget. Connect it to a web map with LRS data published with the Linear Referencing capability enabled and, optionally, the Version Management capability enabled.
  3. Add a Search By Route widget. Connect it to the Map widget, then load the LRS layers from the map widget.

    Search by coordinate

  4. If there are multiple methods configured in the widget settings, choose Coordinate from the Method drop-down menu.
  5. If there are multiple networks configured in the widget settings, choose a network from the Network drop-down menu.
  6. Provide values in the X Coordinate and Y Coordinate text boxes. Optionally, provide a value in the Z Coordinate text box.
  7. Click Search.

    If a valid route exists that fits the search parameters, it appears in the results pane. If only one result exists that fits the search parameters, the map highlights and zooms to that route. If more than one result exists that fits the search parameters, you can select a record in the results pane to make the map highlight and zoom to that route.

    Search results

Search for routes by referent

Complete the following steps to search by referent:

  1. Start Experience Builder. Sign in to an ArcGIS Enterprise portal.
  2. Add a Map widget. Connect it to a web map with LRS data published with the Linear Referencing capability enabled and, optionally, the Version Management capability enabled.
  3. Add a Search By Route widget. Connect it to the Map widget, then load the LRS layers from the map widget.

    Search by referent

  4. If there are multiple methods configured in the widget settings, choose Referent from the Method drop-down menu.
  5. If there are multiple networks configured in the widget settings, choose a network from the Network drop-down menu.
  6. Click the Referent drop-down arrow and choose a referent layer. You can use any point event layer from the map as a referent layer.
  7. Provide a value in the Referent Field text box. You can use any field with unique values from the referent layer as a referent field.
  8. Optionally, provide an offset value in the Offset text box.
  9. Click Search.

    If a valid route exists that fits the search parameters, it appears in the results pane. If only one result exists that fits the search parameters, the map highlights and zooms to that route. If more than one result exists that fits the search parameters, you can select a record in the results pane to make the map highlight and zoom to that route.

    Search results

Interaction options

This widget supports data actions, which you can enable on the Action tab of widgets' settings.

You can use data actions in the Search By Route widget to launch the Add Point Event widget or Add Line Event widget and populate values. To do this, you must turn on the Add Point Event and Add Line Event data actions in the Search By Route widget's settings.

The Search By Route widget's Add Point Event and Add Line Event data actions can populate the route and measure parameters in the Add Point Event and Add Line Event widgets.