The District Lookup widget allows you to find a point feature related to a selected polygon, view detailed information about the features, and get directions to the selected point feature.
The structure of the layers requires a relationship between a point feature and a polygon feature and must be a one-to-one geodatabase relationship.
Configuring the District Lookup widget
This widget can be set to open automatically when an app starts. To enable this feature, click the Open this widget automatically when the app starts button on the widget, which turns it dark green.
- Hover over the widget and click the Configure this widget button to open the configuration properties dialog box.
- Optionally click the Change widget icon button and replace it with your own image.
A file explorer window appears, allowing you to select a local image file to use as the widget icon.
- To configure the Search Source Settings section, see Configuring the Search widget. It follows the same configuration steps as the Search widget.
- In the Search Settings section of the widget configuration, specify the following options:
- Select layer—Click Set to define layers. In the dialog box, define the following parameters:
- Select polygon layer—Define the polygon layer.
- Select point layer related to polygon layer—Define the point layer related to the polygon layer.
- Set location button—Enabling this parameter causes the Set location button to display next to the search box. Click the Set location button, and click the map to set the search location. If you do not enable this parameter, clicking the map will automatically set the location.
- Select symbol to highlight polygon—Select the display symbol, color, transparency, outline color, and outline width to be used to highlight the polygon.
- Address or location symbol—Select and adjust the symbol of the address or location symbol.
- Select color to highlight point—Define the color used to highlight the point symbol.
Note:
The widget uses the pop-up defined in the map on the Information tab. You can enable one or both layers to have pop-ups. Whatever is defined will be displayed on the Information tab. - Select layer—Click Set to define layers. In the dialog box, define the following parameters:
- Optionally, in the Directions Settings section of the widget configuration, set up the widget to use routing, which gives you the option to get driving directions to the selected feature.
License:
ArcGIS Online network analysis services require an ArcGIS Online for organizations subscription. If you choose to work with this by default, specify a valid user name and password for ArcGIS Online. Each successful request to the service incurs service credits taken from your subscription. In addition, if you have ArcGIS Server network analysis services, you can also specify the URL.
Tip:
If you want to share your secure service item with the public, for example, as part of a public web app, store the credentials with the item so the public is not required to log in to get to your app. See ArcGIS Server web services for more information.
- To configure the Directions Settings section of the widget configuration, you’ll need to specify the following options:
- Routing Service—Click Set and browse to a routing service in your ArcGIS Online organizational account or provide the URL to the routing service.
- Direction length units—Select the units used to display directions (kilometers or miles).
- Select symbol to display route—Select the display symbol, color, style, transparency, and width used for the route.
Tip:
Routing is enabled and disabled in the application settings of the ArcGIS Online item page of the map used by the widget. If you see the message To enable directions, ensure that routing is enabled in the ArcGIS Online item on the Directions tab and you want to enable directions, go to Application Settings on the items detail page of the map you are using, recheck the routing application setting, and save the map. See Set map options for apps for more information.Using the District Lookup widget
- Click the District Lookup widget icon to open it.
- Search for an address in the search bar or click a location directly on the map to define the location.
When a defined location is within the polygon layer, you will see information about the point feature and the related polygon highlighted on the map.
- On the Information tab, the map pop-ups are defined for each of the layers.
- Click the Directions tab if the widget is configured to provide driving directions, and it will provide you with driving directions to the selected feature from the defined location.