TomTom Maps for JavaScript
    Preparing search index...

    Type Alias HoverEventType

    HoverEventType: "hover" | "hover-move" | "long-hover"

    Subtype for hover events with timing distinction.

    • hover: Fires once when the cursor first enters a feature
    • hover-move: Fires on every mouse movement while the cursor remains over the same feature. Use this when you need continuously updated coordinates as the cursor travels along the feature (e.g. updating a tooltip position or snapping to a route line).
    • long-hover: Triggered after hovering over a feature for a configured duration (typically 300-800ms)

    Long-hover is useful for showing detailed tooltips or previews without cluttering the UI during quick mouse movements.

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