This is the documentation of version 1.0.0-rc.0. Go to the latest version, 1.0.0-rc.5.
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 stays over the same feature. 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';