TomTom Maps for JavaScript
    Preparing search index...

    Type Alias MapStyleLayerID

    MapStyleLayerID: keyof typeof mapStyleLayerIDs

    The name of a known layer of the TomTom map style: a key of mapStyleLayerIDs.

    Use it to position custom layers relative to standard map layers, for example below labels. mapStyleLayerIDs maps each name to its style layer ID.

    // Add a custom layer below the POIs
    const beforeLayer: MapStyleLayerID = 'poi';
    map.mapLibreMap.addLayer({
    id: 'my-custom-layer',
    type: 'fill',
    source: 'my-source'
    }, mapStyleLayerIDs[beforeLayer]);

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

    mapStyleLayerIDs for the complete list of available layer IDs