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

# multiRouter.ViaPointModel

{% note info %}

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

{% endnote %}

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

The data model of a throughpoint on the multiroute. Throughpoints do not signify a stop. When passing via a throughpoint, the segment of the route path doesn't break.

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

Creates the data model of a multiroute throughpoint.

## Fields {#properties-summary}

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

Inherited from [IEventEmitter](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|| [geometry](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#geometry) | [geometry.base.Point](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometry.base.Point.md) | Geometry of a multiroute throughpoint. ||
|| [multiRoute](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#multiRoute) | [multiRouter.MultiRouteModel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.MultiRouteModel.md) | Reference to the parent model of a multiroute. ||
|| [properties](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#properties) | [data.Manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md) | Data for a multiroute throughpoint. The following fields are available: 
- index: Integer - The sequential number of the point.
- lodIndex: Integer - The ordinal number of the throughpoint in the full set of 	coordinates of the corresponding route path. ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [referencepointchange](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#event-referencepointchange) | Change to the reference point. Instance of the [Event](https://yandex.com/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/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- oldReferencePoint: Object - Description of the previous reference point. ||
|| [update](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#event-update) | Updating the model with new data. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [destroy](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#destroy)() | | Destroys a model. ||
|| [getReferencePoint](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#getReferencePoint)() | Object | Returns the corresponding reference point. ||
|| [getReferencePointIndex](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#getReferencePointIndex)() | Integer | Returns the index corresponding to a reference point in the set of reference points for the parent multiroute. ||
|| [setReferencePoint](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#setReferencePoint)([referencePoint](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#setReferencePoint-param-referencePoint)) | | Sets the description for the corresponding reference point. A reference point can be set using one of the following ways: 
- A string containing the postal address of the reference point.
- An array containing the latitude and longitude of the reference point.
- A geometry.Point geometry describing the reference point. ||
|| [update](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#update)([viaPointJson](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/multiRouter.ViaPointModel.md#update-param-viaPointJson)) | | Updates the model with new data. ||
|#

## Fields details {#field_detail}

### geometry {#geometry}

```javascript
{geometry.base.Point} geometry
```

Geometry of a multiroute throughpoint.

### multiRoute {#multiRoute}

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

Reference to the parent model of a multiroute.

### properties {#properties}

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

Data for a multiroute throughpoint. The following fields are available: 
- index: Integer - The sequential number of the point.
- lodIndex: Integer - The ordinal number of the throughpoint in the full set of 	coordinates of the corresponding route path.

## Events details {#event_detail}
# referencepointchange

Change to the reference point. Instance of the [Event](https://yandex.com/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/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- oldReferencePoint: Object - Description of the previous reference point.

### update {#update}

Updating the model with new data. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

## Methods details {#method_detail}

### destroy {#destroy}

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

Destroys a model.
# getReferencePoint

```javascript
{Object} getReferencePoint()
```

**Returns** the corresponding reference point.
# getReferencePointIndex

```javascript
{Integer} getReferencePointIndex()
```

**Returns** the index corresponding to a reference point in the set of reference points for the parent multiroute.
# setReferencePoint

```javascript
{} setReferencePoint(referencePoint)
```

Sets the description for the corresponding reference point. A reference point can be set using one of the following ways: 
- A string containing the postal address of the reference point.
- An array containing the latitude and longitude of the reference point.
- A geometry.Point geometry describing the reference point.

**Parameters:**

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

Description of the reference point. ||
|#

\* Mandatory parameter/option.

### update {#update}

```javascript
{} update(viaPointJson)
```

Updates the model with new data.

**Parameters:**

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

JSON data. ||
|#

\* Mandatory parameter/option.
</body></topic></topic>