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

# multiRouter.pedestrian.PathModel

{% note info %}

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

{% endnote %}

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

A data model of the pedestrian route. A single route can contain several paths, and each path connects two waypoints.

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

Creates a data model of the pedestrian route.

## Fields {#properties-summary}

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

Inherited from [IEventEmitter](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|| [properties](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#properties) | [data.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md) | Multiroute's path data. The following fields are available: 
- index: Integer - The sequential number of the path in the 	multiroute's corresponding route.
- type: String - The route type identifier; takes the value "pedestrian" 	for pedestrian routes.
- distance: Object - An object with the "text" and "value" fields that describes the length 	of the path in meters.
- duration: Object - An object with the "text" and "value" fields that describes 	the travel time of the path in seconds.
- coordinates: Number[][] - Coordinates of all points on the path.
- encodedCoordinates: String - A string of base64-encoded coordinates for all points 	on the path. ||
|| [route](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#route) | [multiRouter.pedestrian.RouteModel](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.RouteModel.md) | Reference to the parent model of the route. ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [update](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#event-update) | Updating the model with new data. Instance of the [Event](https://yandex.com.tr/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.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- segmentsChange: Boolean - Flag for whether the set of segments is changed ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [destroy](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#destroy)() | | Destroys a model. ||
|| [getSegments](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#getSegments)() | [multiRouter.pedestrian.SegmentModel](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.SegmentModel.md)[] | Returns array of path segments. ||
|| [getType](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#getType)() | String | Returns ID of the route type. For pedestrian routes, returns the string "pedestrian". ||
|| [update](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#update)([pathJson](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.pedestrian.PathModel.md#update-param-pathJson)) | | Updates the state of the model. ||
|#

## Fields details {#field_detail}

### properties {#properties}

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

Multiroute's path data. The following fields are available: 
- index: Integer - The sequential number of the path in the 	multiroute's corresponding route.
- type: String - The route type identifier; takes the value "pedestrian" 	for pedestrian routes.
- distance: Object - An object with the "text" and "value" fields that describes the length 	of the path in meters.
- duration: Object - An object with the "text" and "value" fields that describes 	the travel time of the path in seconds.
- coordinates: Number[][] - Coordinates of all points on the path.
- encodedCoordinates: String - A string of base64-encoded coordinates for all points 	on the path.

### route {#route}

```javascript
{multiRouter.pedestrian.RouteModel} route
```

Reference to the parent model of the route.

## Events details {#event_detail}

### update {#update}

Updating the model with new data. Instance of the [Event](https://yandex.com.tr/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.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- segmentsChange: Boolean - Flag for whether the set of segments is changed

## Methods details {#method_detail}

### destroy {#destroy}

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

Destroys a model.

### getSegments {#getSegments}

```javascript
{multiRouter.pedestrian.SegmentModel[]} getSegments()
```

**Returns** array of path segments.

### getType {#getType}

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

**Returns** ID of the route type. For pedestrian routes, returns the string "pedestrian".

### update {#update}

```javascript
{} update(pathJson)
```

Updates the state of the model.

**Parameters:**

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

JSON data. ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.