OlSelectInteractionComponent

Declarative component to configure and manage OpenLayers Select Interactions. Supports mouse selection, custom query layers, and optimized hover event emission via signals.

TypeScriptexample.ts
import { OlSelectInteractionComponent } from '@angular-helpers/openlayers/interactions'

# Inputs

InputTypeDefaultDescription
idstring-Unique identifier for the select interaction.
layersstring[]-Optional list of layer IDs that the selection interaction will target.
multibooleanfalseWhether multiple features can be selected concurrently.
hitTolerancenumber0Hit-detection tolerance in pixels.
condition'click' | 'pointerMove''click'The condition that triggers feature selection.
activebooleantrueWhether the interaction is currently active on the map.

# Outputs

OutputTypeDescription
selectEventSelectEventEmitted when a feature is selected (typically on click).
hoverEventSelectHoverEventEmitted when a feature is hovered (when condition is pointerMove). Emits inside the Angular zone only on feature ID transitions.

# Methods

MethodSignatureReturnsDescription
createSelectInteractioncreateSelectInteraction(id: string, config: SelectConfig, map: OLMap): voidvoidCreates and configures a Select interaction.
LCP N/A
CLS N/A
INP N/A