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.
Most commonly used reference layer. Positioning layers before this ensures content appears below all text labels, maintaining map readability while keeping visualizations prominent.
Default for SDK modules:
This provides optimal balance between visibility and not 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.
This constant provides reference layer IDs from TomTom's vector map styles that are used as anchors when positioning custom layers in the map's layer stack. By referencing these layer IDs, SDK modules and custom implementations can control where their layers appear in the rendering order (visual stacking).
Understanding Layer Order:
"Lowest" refers to position in the layer stack, not physical elevation. Layers are rendered from bottom to top - layers lower in the stack are drawn first and appear underneath layers higher in the stack. When you add a layer "before" a reference layer, it's inserted lower in the stack and will be drawn underneath that reference layer.
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.get(map);
// Uses mapStyleLayerIDs.lowestLabel by default
GeometriesModule - Configurable layer positioning for polygon areas:
// Default: below labels
const geometriesModule = await GeometriesModule.get(map);
// Custom: below buildings to show at ground level
const geometriesModule = await GeometriesModule.get(map, {
beforeLayerConfig: 'lowestBuilding'
});
// On top of everything
const geometriesModule = await GeometriesModule.get(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 remain consistent across TomTom map style changes (e.g., switching from 'standardLight' to 'standardDark'). The SDK automatically repositions module layers using the corresponding reference layers in the new style, maintaining the intended visual hierarchy.
Important Notes:
lowestBuilding is not available in the Satellite stylelowestLabel for optimal visibility
Key layer IDs from the vector map style for positioning custom layers.