Skip to main content

GeomapSelectionControl

<ui5-geomap-selection-control>
info

The following entity is available under an experimental flag and its API and behavior are subject to change.

The ui5-geomap-selection-control defines the Selection webcomponent.

ES6 Module Import​

import "@ui5/webcomponents-geomap/dist/GeomapSelectionControl.js";

Basic Sample​

Properties​

selectionType​

DescriptionType of the selection used. Can be rectangle, freehand, polygon, circle or select.
Typestring
Default"rectangle"

modes​

DescriptionThe selection mode buttons that should be available to the end user. When empty, all selection modes are rendered.
Supported values: freehand, polygon, rectangle, circle, select.
The buttons render in the order given in the array. If the active selectionType is no longer rendered (because it was removed from modes), it is reassigned to the first button currently visible in the toolbar — this means the active type can stay unchanged even when modes is an empty array or contains only unknown values, since the visible toolbar then falls back to the full default list. Unknown values are dropped with a console.warn; if every supplied value is unknown, the full default list is used as a fallback.
The delete button is always rendered alongside the configured mode buttons and is not affected by this property.
Can be changed at runtime.
TypeArray<GeomapSelectionMode>
Default[]

position​

DescriptionPosition of the control on the map. Can be one of the following: "TopLeft", "TopRight", "BottomLeft", "BottomRight".
TypeGeomapMapControlPosition
Default"TopLeft"

Slots​

No slots available for this component.

Events​

selection-finish​

DescriptionFired when selection is finished.
TypeCustomEvent<SelectionFinishEventDetail>
Parametersid: FeatureId
The id of the selected feature
context: OnFinishContext
The context of the selected feature
snapshot: Array<GeoJSONStoreFeatures>
The snapshot of the selected feature
BubblesYes
CancelableNo

selection-item​

DescriptionFired when item is selected.
TypeCustomEvent<SelectionItemEventDetail>
Parametersid: FeatureId
The id of the selected feature
snapshot: Array<GeoJSONStoreFeatures>
The snapshot of the selected feature
selObj: GeoJSONStoreFeatures
The selected object
BubblesYes
CancelableNo

Methods​

setModeStyles​

DescriptionChanges styling of the selection control with given set of styles
Return typevoid
ParametersoStyles: SelectionStylesConfigType

setValidator​

DescriptionAPI for setting custom validator used during selection.
Return typevoid
Parametersfn: Validation

CSS Parts​

No CSS parts available for this component.