Documentation
Reference
2.1.50 (current version)
collection
interactivityModel
Interfaces

multiRouter.WayPointModel

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

Extends IEventEmitter.

The data model of a multi-stop route waypoint. A waypoint means a stop, and waypoints divide the route into so-called paths.

Fields | Events | Methods

Creates the data model of a multi-stop route waypoint.

Fields

NameTypeDescription
eventsIEventManager

Event manager.

Inherited from IEventEmitter.

geometrygeometry.base.Point

Geometry of a multi-stop route waypoint.

multiRoutemultiRouter.MultiRouteModel

Reference to the parent model of a multi-stop route.

propertiesdata.Manager

Data for a multi-stop route waypoint. The following fields are available:

  • index: Integer - The sequential number of the point.
  • request: String - The request correpsonding to the point of the request.
  • address: String - The postal address of the point.
  • description: String - Description of the point.
  • name: String - Name of the point.
  • geocoderMetaData: Object - Geocoder metadata.

Events

NameDescription
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

NameReturnsDescription
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 multi-stop route.

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(wayPointJson)

Updates the model with new data.

Fields details

geometry

Geometry of a multi-stop route waypoint.

multiRoute

Reference to the parent model of a multi-stop route.

properties

{data.Manager} properties

Data for a multi-stop route waypoint. The following fields are available:

  • index: Integer - The sequential number of the point.
  • request: String - The request correpsonding to the point of the request.
  • address: String - The postal address of the point.
  • description: String - Description of the point.
  • name: String - Name of the point.
  • geocoderMetaData: Object - Geocoder metadata.

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 multi-stop route.

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:

ParameterDefault valueDescription
referencePoint*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Object

Description of the reference point.

* Mandatory parameter/option.

update

{} update(wayPointJson)

Updates the model with new data.

Parameters:

ParameterDefault valueDescription
wayPointJson*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Object

JSON data.

* Mandatory parameter/option.