TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ClearEventStatesOptions

    Parameters to clear the event states of a collection of shown features.

    It clears several features at once, more efficiently than clearing each one.

    // Remove all event states from all features
    const clearAll: ClearEventStatesOptions = {};

    // Remove only click states
    const clearClicks: ClearEventStatesOptions = {
    states: ['click']
    };

    // Remove hover states without rendering
    const clearHovers: ClearEventStatesOptions = {
    states: ['hover', 'long-hover'],
    show: false
    };
    type ClearEventStatesOptions = {
        show?: boolean;
        states?: EventState[];
    }
    Index
    show?: boolean

    Whether to show the feature after clearing the event state.

    Set it to false only to keep changing features before showing them. This can speed up batch updates.

    true
    
    states?: EventState[]

    The event states to clear.

    By default, all event states are cleared from all features.

    // Clear only click states
    states: ['click']

    // Clear the hover and long-hover states
    states: ['hover', 'long-hover']

    // Clear everything (same as omitting)
    states: ['click', 'contextmenu', 'hover', 'hover-move', 'long-hover', 'recently-hovered']