TomTom Maps for JavaScript
    Preparing search index...

    Type Alias RouteHighlightConfig

    The highlights the routes draw: a hovered or clicked route widens its outline in the outline colour, and a focused section is ringed clear of every line the route draws.

    The routes draw their event states once a handler covers them, or RoutingModule.setEventState puts one. RoutingModule.selectRoute clears a route's click state, since the selected style marks the route from then on. A layers.mainLines outline line-width is drawn as given instead. The sections RoutingModule.setSectionFocus marks draw the section highlight.

    type RouteHighlightConfig = {
        outline?: { widthFactor?: number };
        section?: { outline?: { color?: string; widthFactor?: number } };
    }
    Index
    outline?: { widthFactor?: number }

    The hovered or clicked route's outline.

    Type Declaration

    • OptionalwidthFactor?: number

      Multiplier on the outline width, where 1 draws it as on any other route.

      Clamped to 1 to 1.25, its range in routingKnobCatalogue.

      1.2

    section?: { outline?: { color?: string; widthFactor?: number } }

    The focused sections, ringed on both sides of the route without covering what it draws.

    Type Declaration

    • Optionaloutline?: { color?: string; widthFactor?: number }

      The ring, which runs clear of the widest line the route draws: its hovered outline or a section.

      • Optionalcolor?: string

        The ring's colour.

        #000 on light map styles, #FFF on dark styles

      • OptionalwidthFactor?: number

        Multiplier on the ring's width, which grows from 2 to 4 pixels as the zoom grows.

        Clamped to 0.5 to 2, its range in routingKnobCatalogue.

        1