TomTom Maps for JavaScript
    Preparing search index...

    Type Alias RouteStateProps

    Specific props relating to a displayed route's visual style.

    Controls whether a route appears selected (highlighted) or deselected (dimmed). The SDK manages these styles automatically based on user interaction.

    Style States:

    • selected: Primary route with full color saturation and emphasis
    • deselected: Alternative routes shown dimmed/grayed out
    // Main selected route
    const selectedStyle: RouteStateProps = {
    routeState: 'selected'
    };

    // Alternative route
    const alternativeStyle: RouteStateProps = {
    routeState: 'deselected'
    };
    type RouteStateProps = {
        routeState: "selected" | "deselected";
    }
    Index

    Properties

    Properties

    routeState: "selected" | "deselected"

    Visual state-related style of the route.

    Determines the state in which the route is rendered on the map:

    • selected: Full color, more prominent (typically the chosen route)
    • deselected: Reduced opacity, less prominent (alternative routes)