POLAR reference
    Preparing search index...

    Interface RoutingPluginOptions

    Generic options for all plugins.

    There are two implemented layouting systems in POLAR configured by MapConfiguration.layout.

    If layout is set to 'nineRegions' all plugins are placed in a predefined region grid. Use displayComponent to control visibility and layoutTag to specify the target region.

    If layout is set to 'standard', a plugin can be rendered in one of two ways:

    1. As part of the IconMenu: Configure the plugin in the IconMenu's IconMenuPluginOptions.menus | menus configuration. The IconMenu will handle positioning and rendering the plugin at the designated location.
    2. Independent with CSS positioning: Directly add the plugin with addPlugin. The plugin is responsible for its own positioning using CSS (e.g., position: absolute) within the map container.
    interface RoutingPluginOptions {
        type: "ors";
        url: string;
        apiKey?: string;
        displayComponent?: boolean;
        displayPreferences?: boolean;
        displayRouteTypesToAvoid?: boolean;
        layoutTag?:
            | "TOP_LEFT"
            | "TOP_MIDDLE"
            | "TOP_RIGHT"
            | "MIDDLE_LEFT"
            | "MIDDLE_MIDDLE"
            | "MIDDLE_RIGHT"
            | "BOTTOM_LEFT"
            | "BOTTOM_MIDDLE"
            | "BOTTOM_RIGHT";
        selectableTravelModes?: SelectableTravelMode[];
    }

    Hierarchy (View Summary)

    Index
    type: "ors"

    The type of routing service to be used. Currently, only the OpenRouteService ('ors') is implemented.

    url: string

    The url of the routing service to be used.

    apiKey?: string

    The API key to access the routing service. Required for OpenRouteService if not already covered by the given url.

    displayComponent?: boolean

    Should the component be visible at all. Only relevant if MapConfiguration.layout | layout is set to 'nineRegions'.

    false

    displayPreferences?: boolean

    Defines whether the user can choose their route preference.

    false

    displayRouteTypesToAvoid?: boolean

    Defines whether the user can select types of routes to avoid.

    false

    layoutTag?:
        | "TOP_LEFT"
        | "TOP_MIDDLE"
        | "TOP_RIGHT"
        | "MIDDLE_LEFT"
        | "MIDDLE_MIDDLE"
        | "MIDDLE_RIGHT"
        | "BOTTOM_LEFT"
        | "BOTTOM_MIDDLE"
        | "BOTTOM_RIGHT"

    The region where the plugin should be rendered. Required if MapConfiguration.layout | layout is set to 'nineRegions', ignored otherwise.

    selectableTravelModes?: SelectableTravelMode[]

    List of available travel modes.

    ['driving-car', 'cycling-regular', 'foot-walking']