This is the documentation of version 1.0.0-rc.1. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias SupportsEvents

    The properties part of an object that can have an event state.

    Features with this type can store their current event state (click, hover, etc.) for styling and interaction handling.

    It is typically mixed into feature properties to track interactive states. The SDK manages these states automatically from user interactions.

    // Feature with click state
    const featureProps: SupportsEvents = {
    eventState: 'click'
    };

    // Feature with hover state
    const hoveredProps: SupportsEvents = {
    eventState: 'hover'
    };

    // Feature with no event state
    const normalProps: SupportsEvents = {};
    type SupportsEvents = {
        eventState?: EventState;
    }
    Index
    eventState?: EventState

    The feature's current event state.

    • undefined: No active event state (normal appearance)
    • Event type: Active state that affects styling and behavior
    • recently-hovered: The pointer just left the feature. See EventState.

    The SDK manages this property automatically from user interactions and programmatic state changes.