This is the documentation of version 1.0.0-rc.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, with 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, border crossings and section icons. Above the map's labels, the tunnel sign and the icons generated section types ask for lowest among them. A target puts them all beneath it, in that order.

    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' };