multiRouter.ViaPointModel

Note

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

Extends IEventEmitter.

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 | Events | Methods

Creates the data model of a multiroute throughpoint.

Fields

Name

Type

Description

events

IEventManager

Event manager.

Inherited from IEventEmitter.

geometry

geometry.base.Point

Geometry of a multiroute throughpoint.

multiRoute

multiRouter.MultiRouteModel

Reference to the parent model of a multiroute.

properties

data.Manager

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

Name

Description

referencepointchange

Change to the reference point. Instance of the Event class. Names of fields that are available via the Event.get method:

  • oldReferencePoint: Object - Description of the previous reference point.

update

Updating the model with new data. Instance of the Event class.

Methods

Name

Returns

Description

destroy()

Destroys a model.

getReferencePoint()

Object

Returns the corresponding reference point.

getReferencePointIndex()

Integer

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

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.

update(viaPointJson)

Updates the model with new data.

Fields details

geometry

{geometry.base.Point} geometry

Geometry of a multiroute throughpoint.

multiRoute

{multiRouter.MultiRouteModel} multiRoute

Reference to the parent model of a multiroute.

properties

{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

referencepointchange

Change to the reference point. Instance of the Event class. Names of fields that are available via the Event.get method:

  • oldReferencePoint: Object - Description of the previous reference point.

update

Updating the model with new data. Instance of the Event class.

Methods details

destroy

{} destroy()

Destroys a model.

getReferencePoint

{Object} getReferencePoint()

Returns the corresponding reference point.

getReferencePointIndex

{Integer} getReferencePointIndex()

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

setReferencePoint

{} 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[*](*star)

—

Type: Object

Description of the reference point.

* Mandatory parameter/option.

update

{} update(viaPointJson)

Updates the model with new data.

Parameters:

Parameter

Default value

Description

viaPointJson[*](*star)

—

Type: Object

JSON data.

* Mandatory parameter/option.