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 MapStyleLayerID

    MapStyleLayerID: keyof typeof mapStyleLayerIDs

    A known layer ID from the TomTom map style.

    These layer IDs exist in the TomTom vector map style. Use them to position custom layers relative to standard map layers, for example below labels.

    They include:

    • Label layers, such as 'lowestLabel' and 'POI'.
    • Road layers, such as 'Road' and 'Motorway'.
    • Building layers, such as 'Building'.
    • 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