TomTom Maps for JavaScript
    Preparing search index...

    Type Alias HoverEventType

    HoverEventType: typeof HOVER_EVENT_STATES[number]

    Subtype for hover events with timing distinction.

    • hover: Fires once when the cursor first enters a feature.
    • hover-move: Fires as the cursor moves while it stays over the same feature, at most once per animation frame. Use it for coordinates that follow the cursor along the feature, for example to move a tooltip or snap to a route line.
    • long-hover: Fires after the cursor stays over a feature for a configured duration (typically 300-800ms).

    Use long-hover for detailed tooltips or previews that don't clutter the UI during quick mouse movements.

    const quickHover: HoverEventType = 'hover';
    const movingHover: HoverEventType = 'hover-move';
    const sustainedHover: HoverEventType = 'long-hover';