selection-ui

This bundle provides a widget that allows spatial selection of features on the map. The selection is usually performed in stores like an AGSStore.

Custom bundles can add capabilities to provide additional input geometries for the selection.

Usage

To make the selection widget available to the user, add the tool ID selection-ui-tool to a tool set.

The widget is registered at the component system with the widget role selection-ui.

This bundle does not provide capabilities to display the selection results. Use the result-ui bundle to display the result set.

The selection is performed by an instance of the SpatialSearchService from the selection-services bundle. For more information about the sources being searched by this service, see the selection-services bundle.

Configuration reference

The following code sample shows the configurable properties and its default values:

"selection-ui": {
    "Config":{
        "preselectSources": "all",
        "activateSelectionMethod": true,
        "closeOnSelection": true,
        "selectionMethods": ["*"],
        "selectionOptions": {},
        "showSelectionModeToggle": true,
        "resetStateOnOpen": false
    }
}
Name Type Description
preselectSources String Defines which stores are activated when the selection widget is opened. By default, all available stores are selected. If set to none, no stores are selected. If set to disabled, the initial selection remains unchanged when the widget is closed and reopened.
activateSelectionMethod Boolean Defines, if a selection method is activated when the selection widget is opened. By default, the first selection method is activated. If set to false, no selection method is activated. If set to null, the initial activation remains unchanged when the window is closed and reopened.
closeOnSelection Boolean By default, the widget is closed after the selection is made. To keep the widget open after a selection, set to false.
selectionMethods Array Enumeration of all selection methods to be provided in the selection widget. The methods must be registered with the component system to be actually available. By default, all available methods are included. The rectangle, point and polygon methods are provided by the selection-services bundle.
selectionOptions Object Defines special parameters for certain selection methods. To change the click tolerance for point selections, use {"point": {"clickTolerance" : 3}}.
showSelectionModeToggle Boolean By default, users can decide whether existing results should be replaced or merged with a new selection. Set the value to false to hide this option.
resetStateOnOpen Boolean If true it defines that the flags preselectSources and activateSelectionMethod are interpreted with every new opening of the selection window otherwise the last settings of the user are restored.