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

    Type Alias SectionSignConfig

    The sign a section type posts its own value on.

    speedLimit is the one type that takes this, and it draws only signs. It draws no line along the stretch, because a line would mark every stretch that carries a limit without ever saying what the limit is. SectionDisplayConfig.visible switches the signs themselves.

    The sign follows the road rather than the reader. Where the route also carries country sections, each sign takes the face, the unit and the numeral colour of the country its stretch runs through: the white disc most of Europe posts on, the yellow one Sweden, Finland and Iceland use, the SPEED LIMIT plaque of the United States, and Japan's blue numerals. A country with no entry posts the white disc in km/h.

    Where mph is posted, the number is converted and rounded to the step signs come in. Without country sections, the display units decide the face and the unit, and an explicit unit overrides both.

    A sign stands where the limit changes, and placement repeats it down the stretch instead. Signs scale with the zoom, as the ferry and toll-road icons do, a tenth smaller than the tunnel and closed-road signs. minZoom decides how early they appear at all.

    type SectionSignConfig = {
        minZoom?: number;
        placement?: SectionSignPlacement;
        priority?: SectionSignPriority;
        unit?: SectionSignUnit;
    }
    Index
    minZoom?: number

    The lowest zoom the signs are drawn at.

    11, one zoom past the tunnel and closed-road signs. A route posts many more
    speed limits, and further out they crowd the overview of the route.

    Where the signs are posted along the stretch.

    'atChange', which is where the road posts its own.

    What a sign gives way to when another symbol wants the same spot.

    RoutingModuleConfig.beforeLayerConfig decides where the route icons sit. This places the signs relative to them and to the map's labels.

    follows placement: 'belowRouteIcons' under atChange, where the sign is the only one posting that change; 'belowMapLabels' under along, where the next repeat posts it again.

    The unit every sign reads in, whatever the road posts.

    If you leave it out, each sign follows its own country, or the display units where the route carries no country sections.