Select Widget
The Select widget enables you to interactively select features on the map by drawing various shapes and lines and perform actions on the selected features (output). Given below is a snapshot of the select widget and the full list of actions available to use, along with the instructions to use them
-
Select tool turn on/off toggle: The drop-down enables you to choose how you would like to select the data in the map (e.g., by drawing a rectangle, line, circle, etc.).
-
Clear All: Clears all selections.
-
Layers: Shows the available layers to select from that are present on the map.
-
Layer selection options: All Selectable, None Selectable, Toggle All.
-
Attribute selection: Enables you to apply filters based on SQL query based clauses.
-
Clear selection: Clears selection for the current layer.
-
Actions Menu: This will be enabled only when a layer is selected. The selection actions include the following:
- Statistics: Not available for a single feature. It only summarizes the field with numeric type.
- Zoom to: The default.
- Pan to: The default. Pan the map to selected features.
- Show on Map: Highlights the selected features.
- Export to Feature Collection: Export selected features to a features collection.
- Export to GPX file.
- Export to KMZ file.
- View in Attribute Table: Shows selected features records in Attribute Table.
- Export to JSON
- Export to CSV
- Export to GeoJSON
- Export to Item
How to Use the Select Widget
-
Click the Select Widget to open the select pop-up window.
-
Choose any layer or the layers you want by checking the box.
-
Click on the select tool to turn it on (Blue means selection is enabled). By default, the rectangle selection tool is enabled to use. To change to another shape, click the arrow next to the Select button. To toggle the Select tool, click the Select icon.
-
Click and/or drag the pointer on the map area to select the features within it.
-
Once you have selected, the features within the selections are highlighted and the total number of features selected will be shown next to the layer name.
Peform Additional Actions
- Once a selection is made, click the Actions icon to bring up the menu (note: The actions menu will not appear if no layer is selected).
- Select the desired action.
Select and Filter
You can use SQL based queries/clauses to select and filter features based on the desired criteria in the webmap.
-
Once you have made a selection, click the Attribute selection icon next to the layer.
-
This will show a Custom SQL option with a toggle button to enable the query.
-
Click the icon to build a query.
-
Add a filter expression. The filter expression can be a value-based operation or an operation between two fields.
-
Select a query field (an expression) and provide a value in the text box. You have the following three options:
- Value: This filter is based on a specific value.
- Field: Compare the value in one field with the value in another field.
- Unique: This filter is based on a list of the unique values for the selected field in the layer.
-
You can also use Add a clause set, which allows you to define and apply multiple filters to the selection. If All or Any of the expressions in this set are true, records meeting all the expressions or records meeting any of the expressions in the set are returned as results.
-
To enable the filtering based on the SQL query/clause we created, turn on the filter using the toggle button.