Interface HoverHandlerOptions

Options for createHoverHandler.

interface HoverHandlerOptions {
    layer: string;
    source: string;
    sourceLayer?: string;
    stateKey?: string;
}

Properties

layer: string

Layer ID to listen for mouse events on.

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"