GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Binds click + hover handlers that emit geoleaf:feature:click / geoleaf:feature:hover for an interactive layer. Kernel-only: no rendering, no popup — only events + the pointer cursor. Safe no-op when the layer is non-interactive (interactiveShape === false) or when none of its sub-layers exists.

      ONE listener per gesture for the whole layer, over every sub-layer that draws features: a gesture on a feature emits one event however many sub-layers render it, and the feature reported is the one drawn on top — a point lying on a polygon of the same layer answers as the point. leave fires once the pointer has left every sub-layer of the layer, not when it crosses from one to another.

      Between two LAYERS under a click, only the one drawn on top emits: see _isCoveredByAnotherLayer. A hover is emitted by each layer under the pointer, with the zIndex its listeners rank by.

      Parameters

      • layerId: string

        GeoLeaf layer id (forwarded on every event).

      • def: Record<string, unknown>

        Layer definition; read for interactiveShape and zIndex.

      • nativeMap: GeoJSONNativeMap

        The raw maplibregl.Map instance.

      • subLayerIds: string[]

        The layer's MapLibre sub-layer IDs; the ones that draw features are bound.

      Returns void