TomTom Maps for JavaScript
    Preparing search index...

    Type Alias MapStyleLayerID

    MapStyleLayerID: keyof typeof mapStyleLayerIDs

    Known layer ID from the TomTom map style.

    These are predefined layer IDs that exist in the TomTom vector map style. Use these constants when you need to position custom layers relative to standard map layers (e.g., placing a layer below labels).

    Available Layer IDs include:

    • Label layers (e.g., 'lowestLabel', 'POI')
    • Road layers (e.g., 'Road', 'Motorway')
    • Building layers (e.g., 'Building')
    • And many more defined in the style
    // Add a custom layer below POI labels
    const beforeLayer: MapStyleLayerID = 'POI';
    map.addLayer({
    id: 'my-custom-layer',
    type: 'fill',
    source: 'my-source'
    }, beforeLayer);

    // Position geometry below all labels
    const geometryConfig = {
    beforeLayerConfig: 'lowestLabel' as MapStyleLayerID
    };

    mapStyleLayerIDs for the complete list of available layer IDs