@honua/sdk-js
    Preparing search index...

    Interface HoverHandlerOptions

    Options for createHoverHandler.

    interface HoverHandlerOptions {
        layer: string;
        onHoverTargetChange?: (
            hovered: SourceQualifiedFeatureSelectionTarget | undefined,
        ) => void;
        source: string;
        sourceLayer?: string;
        stateKey?: string;
    }
    Index

    Properties

    layer: string

    Layer ID to listen for mouse events on.

    onHoverTargetChange?: (
        hovered: SourceQualifiedFeatureSelectionTarget | undefined,
    ) => void

    Called whenever the hovered feature changes, with the source-qualified target or undefined when the pointer leaves the layer. Mirrors SelectionHandlerOptions.onSelectionTargetsChange so a hover, like a selection, can be published without re-reading hoveredId on a timer.

    source: string

    Source ID to set feature state on.

    sourceLayer?: string

    Source layer (required for vector-tile sources).

    stateKey?: string

    Feature-state key to toggle.

    "hover"