ConstReadonlycountry: "Places - Country name"Country name label layer.
ReadonlylowestBuilding: "Buildings - Underground"The lowest building layer in the stack.
ReadonlylowestLabel: "Borders - Treaty label"The lowest labels layer in the stack.
The most commonly used reference layer. Layers positioned before it appear below all text labels, so the map stays readable while visualizations stay prominent.
Default for SDK modules:
It balances visibility against obscuring map labels.
ReadonlylowestPlaceLabel: "Places - Village / Hamlet"The lowest layer for place labels.
ReadonlylowestRoadLine: "Tunnel - Railway outline"The lowest road line layer in the stack.
Readonlypoi: "POI"Points of Interest layer.
These layer IDs from TomTom's vector map styles serve as anchors for positioning custom layers in the map's layer stack. SDK modules and custom implementations reference them to control where their layers appear in the rendering order (visual stacking).
Understanding Layer Order:
"Lowest" refers to the position in the layer stack, not to physical elevation. Layers render from bottom to top, so lower layers are drawn first and appear underneath higher ones. A layer you add "before" a reference layer goes lower in the stack and is drawn underneath it.
How SDK Modules Use These IDs:
RoutingModule - Positions route visualizations below labels for readability:
// Routes appear below labels but above the base map
const routingModule = await RoutingModule.create(map);
// Uses mapStyleLayerIDs.lowestLabel by default; `beforeLayerConfig` moves the route lines
const underRoads = await RoutingModule.create(map, { beforeLayerConfig: { mainLines: 'lowestRoadLine' } });
GeometriesModule - Configurable layer positioning for polygon areas:
// Default: on top of the map, below the geometry titles
const geometriesModule = await GeometriesModule.create(map);
// Custom: below buildings to show at ground level
const geometriesModule = await GeometriesModule.create(map, {
beforeLayerConfig: 'lowestBuilding'
});
// On top of everything
const geometriesModule = await GeometriesModule.create(map, {
beforeLayerConfig: 'top'
});
Custom Layer Implementation:
// Add a highlight layer below labels
map.addLayer({
id: 'search-results',
type: 'fill',
source: 'results-source',
paint: { 'fill-color': '#ffcc00', 'fill-opacity': 0.4 }
}, mapStyleLayerIDs.lowestLabel);
Style Persistence:
These layer IDs stay the same across TomTom map style changes, such as from 'streetLight' to 'streetDark'. The SDK automatically repositions module layers against the matching reference layers in the new style, keeping the intended visual hierarchy.
Important Notes:
lowestRoadLine and lowestBuilding are not available in the Satellite stylebeforeID that never appears is reported through
console.error and skipped, since a missing anchor there is usually a typo.lowestLabel, and GeometriesModule adds its layers on top
Key layer IDs from the vector map style for positioning custom layers.