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 SetStyleOptions

    Options accepted by TomTomMap.setStyle.

    type SetStyleOptions = {
        resetState?: boolean;
    }
    Index
    resetState?: boolean

    Whether to drop the SDK state instead of carrying it over to the new style.

    • false (default): module data and configuration, filters and the style parts of the previous style (traffic, terrain) are restored onto the new style.
    • true: a clean switch. Modules re-bind to the new style with default configuration and nothing shown, and only the style parts named in the new style input are loaded.

    The map language and geopolitical view are not SDK state, so both survive either case. Only TomTomMap.setLanguage and TomTomMap.setGeopoliticalView change them.

    Registered StyleChangeHandlers run in both cases and receive the value in their StyleChangeContext.

    false