---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.2
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/router/about.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/dg/concepts/router/about.md
  - href: https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/router/about.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt?revision=r21950234
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt?revision=r21950234

# Routing

[Overview](#general)

[Ways to set a route](#section_axs_1ch_xdb)

[Basic concepts](#section_sss_r5x_k2b)

## Overview {#general}

The Router is a service for building routes on the map. The service allows you to automatically calculate a route between specified points and get information about the route, such as the distance of the route or the estimated travel time. You can set routes with or without traffic allowances.

The following types of routing are available:

- driving
- walking
- public transit
- biking

The API takes the specified points and builds several optimal routes. The fastest route is set as the active route. It is displayed on the map in purple. Alternative routes are gray. Users can switch between routes with a click.

{% note alert %}

Routing requests are [fee-based](https://yandex.com/maps-api/products/js-api#tariffs).

{% endnote %}

## Ways to set a route {#section_axs_1ch_xdb}

You can set a route on the map in the following ways:

#|
|| **Method** | **Description** ||
|| In the [routing panel](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/router/routePanel.md)

![](../../_images/route-panel-small-size.png) |

Interface control for working with routes. Users can set the start and ending points of a route, select a routing type, or remove a route from the map.

The routing panel allows you to programmatically set route points and select a routing type.

**Advantages**
- Convenient interface: users choose their own route.
- Build routes that allow ordering a taxi. [Details](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/router/routePanel.md#how-to-use-taxi)

**Disadvantages**

- Doesn't support intermediary points — you can only set routes with two endpoints. ||
|| At the code level, using the [multiRouter.MultiRoute](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/router/multiRouter.md) class

![](../../_images/route-ex-small.png) |

Routing control at the level of program code.

**Advantages**
- Allows you to build multi-stop routes with an unlimited number of points.
- Allows you to build bike routes.

**Disadvantages**

- More difficult to implement. ||
|#

## Basic concepts {#section_sss_r5x_k2b}

_Multiroute_ — A basic object for working with routing. It contains information about created routes: the geometry, pixel data, travel time, and so on. The multiroute processes this data and creates a view to display the routes on the map.

_Active route_ — The selected route. It is displayed on the map in purple. By default, the fastest available route is selected as the active route.

_Waypoint_ (or _stopping point_) — A point on the route to stop at. The start and ending points are also considered waypoints. On the map, waypoints are marked with letters, such as «A», «B», «C».

_Throughpoint_ — An intermediary point that the route must go through, but does not imply a stop. Throughpoints are only available for driving routes.

_Path_ — The route line that connects waypoints. In the image below, the route has two paths. The first path is between points «A» and «B», and the second path is between points «B» and «C». Routes that are built via the routing panel always have one path.

_Segment_ — A section of the route between:
- Waypoints or throughpoints.
- Points where the direction of travel may change (a fork, entrance, exit, turn, U-turn, or intersection).
- Points where the type of route section changes. For example, the point where a «walking» segment changes to a «bus» segment.

