This is the documentation of version 1.0.0-rc.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.

    A symbol layer over the section's own source draws it. 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?: SectionIconPlacement;
        sizeFactor?: number;
    }
    Index
    image: string

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

    Where the icon sits on the section.

    "center" on the generated types; the bespoke types that draw an icon keep their own placement.

    sizeFactor?: number

    Multiplier over the size the type draws its icon at. That is the sprite image's own size on the generated types, and the zoom-ramped size on ferry, tollRoad, tunnel and vehicleRestricted. Clamped to 0.25 to 2, its range in routingKnobCatalogue.

    1