TomTom Maps for JavaScript
    Preparing search index...

    Type Alias BaseMapLayerGroups

    Layer group filter for selective base map display.

    Defines which layer groups to include or exclude from the base map module. Can be expressed as explicit inclusions (show only these) or exclusions (show all except these).

    Filter Modes:

    • include: Only the specified groups are shown, all others are hidden
    • exclude: All groups are shown except the specified ones

    Common Use Cases:

    • Show only roads and labels (minimal map)
    • Hide buildings for cleaner appearance
    • Show only water and land (base terrain)
    • Remove labels for overlay maps
    // Show only roads and borders
    const roadsOnly: BaseMapLayerGroups = {
    mode: 'include',
    names: ['roadLines', 'roadLabels', 'borders']
    };

    // Show everything except buildings
    const noBuildings: BaseMapLayerGroups = {
    mode: 'exclude',
    names: ['buildings2D', 'buildings3D']
    };

    // Show only terrain (no labels, no roads)
    const terrainOnly: BaseMapLayerGroups = {
    mode: 'include',
    names: ['land', 'water']
    };
    type BaseMapLayerGroups = {
        mode: "include" | "exclude";
        names: BaseMapLayerGroupName[];
    }
    Index

    Properties

    Properties

    mode: "include" | "exclude"

    Filter mode determining whether groups are included or excluded.

    • include: Only the specified groups are considered, all others are ignored
    • exclude: All base map groups except the specified ones are considered
    mode: 'include'  // Whitelist approach
    mode: 'exclude' // Blacklist approach

    Names of the layer groups to include or exclude.

    The meaning depends on the mode:

    • In include mode: Only these groups will be shown
    • In exclude mode: These groups will be hidden, all others shown
    // Show only these
    names: ['roadLines', 'roadLabels', 'water']

    // Hide these
    names: ['buildings2D', 'buildings3D', 'houseNumbers']