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

    Type Alias SectionIconConfig

    The icon drawn on a route section.

    Backed by a symbol layer over the section's own source: the generated section types get one added, and the types that already draw an icon (ferry, tollRoad) have theirs replaced.

    type SectionIconConfig = {
        image: string;
        placement?: "center" | "along";
        size?: number;
    }
    Index
    image: string

    The id of an image in the loaded style's sprite, e.g. poi-toll_plaza. An id the sprite does not carry draws nothing.

    placement?: "center" | "along"

    Where the icon sits on the section.

    • center: one icon at the middle of each section.
    • along: icons repeated along the section.

    A section is a stretch of line, so there is no placement at its start: MapLibre places symbols on a line either once at its centre or repeatedly along it.

    "center"

    size?: number

    Icon scale, where 1 is the sprite image's own size.

    1