---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md
  - https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/multiRouter.driving.RouteModel.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/jsapi-v2-1/doc/en/llms.txt

# multiRouter.driving.RouteModel

{% note info %}

The constructor of the multiRouter.driving.RouteModel class is hidden, as this class is not intended for autonomous initialization.

{% endnote %}

Extends [IEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md).

Data model for an individual driving route. A multiroute can consist of several individual routes.

[Fields](#properties-summary) | [Events](#events-summary) | [Methods](#methods-summary)

Creates the data model of an individual driving route.

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [events](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events) | [IEventManager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventManager.md) | Event manager.

Inherited from [IEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|| [multiRoute](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#multiRoute) | [multiRouter.MultiRouteModel](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.MultiRouteModel.md) | Reference to the parent model of a multiroute. ||
|| [properties](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#properties) | [data.Manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md) | The route data. The following fields are available: 
- index: Integer - The ordinal number of the route in a multiroute.
- type: String - Route type identifier, which takes the value "driving" for 	automobile routes.
- blocked: Boolean - Indicates that the route contains blocked sections.
- distance: Object - An object with the "text" and "value" fields that specifies the length 	of the route in meters.
- duration: Object - An object with the "text" and "value" fields that specifies the travel time 	of the route in seconds.
- durationInTraffic: Object - An object with the "text" and "value" fields that 	specifies the travel time of the route (in seconds) considering traffic.
- boundedBy: Number[][] - Coordinates of the upper and lower corners of the rectangle 	that bounds the route. ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [update](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#event-update) | Updating the model with new data. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- pathsChange: Boolean - Flag for whether the set of paths is changed. ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [destroy](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#destroy)() | | Destroys a model. ||
|| [getPaths](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#getPaths)() | [multiRouter.driving.PathModel](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.PathModel.md)[] | Returns array of route paths. ||
|| [getType](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#getType)() | String | Returns ID of the route type. For automobile routes, it returns the string "driving". ||
|| [update](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#update)([routeJson](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.driving.RouteModel.md#update-param-routeJson)) | | Updates the state of the model. ||
|#

## Fields details {#field_detail}

### multiRoute {#multiRoute}

```javascript
{multiRouter.MultiRouteModel} multiRoute
```

Reference to the parent model of a multiroute.

### properties {#properties}

```javascript
{data.Manager} properties
```

The route data. The following fields are available: 
- index: Integer - The ordinal number of the route in a multiroute.
- type: String - Route type identifier, which takes the value "driving" for 	automobile routes.
- blocked: Boolean - Indicates that the route contains blocked sections.
- distance: Object - An object with the "text" and "value" fields that specifies the length 	of the route in meters.
- duration: Object - An object with the "text" and "value" fields that specifies the travel time 	of the route in seconds.
- durationInTraffic: Object - An object with the "text" and "value" fields that 	specifies the travel time of the route (in seconds) considering traffic.
- boundedBy: Number[][] - Coordinates of the upper and lower corners of the rectangle 	that bounds the route.

## Events details {#event_detail}

### update {#update}

Updating the model with new data. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- pathsChange: Boolean - Flag for whether the set of paths is changed.

## Methods details {#method_detail}

### destroy {#destroy}

```javascript
{} destroy()
```

Destroys a model.

### getPaths {#getPaths}

```javascript
{multiRouter.driving.PathModel[]} getPaths()
```

**Returns** array of route paths.

### getType {#getType}

```javascript
{String} getType()
```

**Returns** ID of the route type. For automobile routes, it returns the string "driving".

### update {#update}

```javascript
{} update(routeJson)
```

Updates the state of the model.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`routeJson`](#update-param-routeJson)[*](*star) | — | Type: Object

JSON data. ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.