The Near Me widget allows you to find and analyze features within a specified distance of a defined location. The location can be a selected feature, a drawn graphic, or a location defined by another input method. You can also find features based on the current map extent.
The widget can perform three types of analysis: find the feature that is closest to a defined location, find all features within a specified distance of a defined location, and summarize numeric values of nearby features using statistics functions and SQL expressions.
Examples
Use this widget to support app design requirements such as the following:
- You want users to click a point on the map and identify the nearest voting location.
- You want users to determine the total population in towns within a certain distance of a hospital.
- You want users to determine how many buildings in an area are in compliance with local accessibility regulations.
Usage notes
This widget requires connection to a Map widget. The Map widget must be connected to a data source with at least one feature layer.
If a data source has related data and you configure related records in pop-ups in Map Viewer, you can view related records in the Near Me widget in Experience Builder.
The Near Me widget generates output data sources that other widgets can use. The Closest and Proximity analysis tools each generate one output feature layer. The Summary analysis tool generates two output feature layers, one for summary statistics and one for all features involved in the analysis.
Settings
The Near Me widget includes the following settings:
-
Select a Map widget—Select a Map widget.
-
Map or scene settings—Click a web map or web scene to open a map settings panel.
-
Search method—Define how the widget finds features.
-
Current map area—Allow users to find features within the current map extent.
-
Specify a location——Allow users to search for features within a certain distance of an input location. This option includes the following additional settings:
- Heading label—Customize the header text that appears in the upper left corner of the widget. You can change the label's font, style, color, and size in pixels (px).
- Search distance—Provide a default number for the search distance.
- Distance units—Specify a default unit for the search distance.
-
-
Inputs—Configure settings related to how the user defines an input location.
- Distance settings—Check this box to allow the user to change the search distance and unit at run time.
- Input location label—Check this box to have the widget show the input location's address at run time when the input location is a point.
- Sketch tools—Turn on these switches to include the input location drawing tools in the widget panel at run time.
-
Analysis—Define how the widget analyzes features.
-
Add Analysis—Add a new analysis tool to the widget's run time panel.
-
Select layer—Select a feature layer to be analyzed.
-
Label—Add a meaningful label to the analysis tool.
-
Analysis Type—Specify an analysis type:
-
Closest Feature—Find the feature within the specified distance that is closest to the input location.
-
Proximity—Find all features within a certain distance of the input location.
-
Display field—Specify the field that is used to identify individual features in the results list. The default field is
Object
.ID -
Sort features—List results by distance from the input location or by a field in ascending or descending order.
-
Group features—Optionally, group features by a field in ascending or descending order. This setting is appropriate for analyzing categorical data. Once you set a group field, a second field selector appears, which you can use to set a subgrouping field. Optionally, click Settings to configure the following settings for both fields.
- Sort groups by count—Sort groups and subgroups by the number of features in each group.
- "No value" group label—Enter a label that appears when no features fit the group criteria.
-
-
Summary—Summarize numeric values of features using statistics functions and SQL expressions.
-
Add Summary—Add a new data summary. You can summarize data in the following ways:
- Statistics—Get statistics function results (MAX, MIN, AVERAGE, and SUM) or the data count (COUNT) for a selected field.
- Expression—Build a more complex expression with the five function operators (AVERAGE, COUNT, SUM, MAX, and MIN) and data fields.
-
Sum of intersected length or Sum of intersected area—Check the box to show the total intersecting length (for line features) or area (for polygon features) of features within the search distance buffer. This setting appears when the connected layer is either a line or polygon feature layer. Click the edit button to add a label and format numbers.
-
Color mode—Specify a method for displaying background colors, either single color or by category. Then choose the colors. This setting appears once you add a summary.
-
-
The following settings appear for all three analysis tools:
-
Highlight results on map—If this setting is turned on, results are highlighted on the map when the user clicks and expands the results list. You can choose the highlight color.
-
Expand analysis results—Specify whether the list of results is expanded or collapsed by default.
-
Expand feature details—For Proximity, check the box to expand details for individual features in the results list by default.
-
-
Return intersected polygons—If this setting is turned on, polygons that intersect with the input location are included in the results.
-
Configure fields to export—Choose which fields to include when the user exports results with the Exportdata action.
-
Include approximate distance—For Closest Feature and Proximity, turn on this setting to add an approximate distance field to the exported
.csv
,.json
, or.geojson
file.
-
-
Display feature count—Optionally, display a feature count for each analysis tool.
-
Display analysis icon—Optionally, display analysis tool icons.
-
-
Results—Configure settings related to how analysis results appear at run time.
-
Feature count—Include counts of features in results.
-
Analysis icons—Include icons next to the name of each analysis tool in results.
-
Map symbols—Include map symbols representing the symbology of features that meet the analysis criteria.
-
Approximate distance—Include distance values showing approximately how far found features are from the input location. The unit that appears is the unit you set under Distance units, or the unit that the user picks at run time.
-
Filter layers to only show results—Filter the layers to only show features that meet the analysis criteria.
-
Display all layer results, regardless of visibility—Turn on this setting to include features from layers that have their visibility turned off in the map. Otherwise, results do not include features from layers that are invisible.
-
Enable proximity search—Turn on this setting to allow users to use individual results as a new input location for the analysis. This setting allows the Near Me widget to be both the trigger and target of the Set location data action, which you can configure on the Action tab of the widget's settings.
-
-
-
General Settings—Configure the following general settings:
- Sketch color—Define the color for points, lines, and polygons drawn with the widget's sketch tools.
- No results found message—Customize the text that appears in the widget when no features are found. You can change the text's font, stroke, color, and size in pixels (px).
- Custom welcome message—Customize the text that appears when the widget first loads. You can use this text to provide instructions. This text disappears after the user runs an analysis.
Allow export
The Near Me widget can export results to .csv
, .json
, and, .geojson
files. To allow the user to export results, ensure Allow export is turned on in the Data panel for the connected feature layer. To include the Export button in the widget's results panel at run time, turn on Enable data action on the Action tab of the Near Me widget's settings.
Interaction options
The Near Me widget can find features if they are within the current map extent or close to a drawn point, line, or polygon. You can also use message and data actions to get the input location from a Search widget, Table widget, Add Data widget, and other widgets.
The Near Me widget can be the target of the Record selection changes trigger. Triggers and message actions create automatic interactions between Experience Builder widgets. For example, you can configure the Near Me widget to automatically find nearby features when the user searches for a record with the Search widget. Similarly, you can configure the Near Me widget to automatically find nearby features when the user selects a feature in a Table widget. The Record selection changes message action is available on the Action tab of the Search, Table, and other widgets' settings.
View a list of the widgets that support the Record selection changes trigger.
The widget can also be the target of the Set location data action, which you can turn on in other widgets' settings and in the settings of the Near Me widget. You can use this data action to add a Set location button to widgets such as Feature Info. You can also use this data action to allow users to use results from one analysis as the input location for another analysis. To do this, turn on the Enable proximity search setting.
View a list of the widgets that support the Set location data action.
In the Near Me widget's Action settings, the Export data action is supported. If you turn on this data action, users can export analysis data to CSV format at run time.
If you add a Directions widget to your app, the Near Me widget supports the Plan route data action. You can plan a route with multiple stops using point data from the Near Me widget.
Additional resources
The following are resources for re-creating ArcGIS Web AppBuilder workflows in Experience Builder: