This is the documentation of version 0.60.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias RoutingBeforeLayerConfig

    RoutingBeforeLayerConfig: PartsBeforeLayerConfig<
        "mainLines"
        | "instructionLines"
        | "icons",
    >

    Where the route's layers sit in the map's layer stack: one target for the whole route, or one per part of it.

    The parts, and where each sits by default:

    • mainLines — the route lines, with every section line (the bands drawn under the route line and the stretches drawn over it). Below the map's labels.
    • instructionLines — the guidance lines and their arrows. Below the map's labels, above the route lines.
    • icons — every icon the route draws: waypoints, summary bubbles, charging stops, border crossings and section icons. Most sit above the map's labels; section icons drawn on generated section types and the tunnel sign sit below them. A target puts them all beneath it, those two lowest.

    Each part keeps its own layers' order wherever it goes. Section signs are not a part: their SectionSignConfig.priority settles which symbols they give way to, among the route icons and the map labels wherever this put them.

    // The whole route on top of the map
    const everything: RoutingBeforeLayerConfig = 'top';
    // Route lines under the road network, icons where they are
    const lines: RoutingBeforeLayerConfig = { mainLines: 'lowestRoadLine' };