multiRouter.pedestrian.RouteModel
Note
The constructor of the multiRouter.pedestrian.RouteModel class is hidden, as this class is not intended for autonomous initialization.
Extends IEventEmitter.
A data model of a single pedestrian route. A multiroute can consist of several individual routes.
Creates a data model of a single pedestrian route.
Fields
Name |
Type |
Description |
Event manager. Inherited from IEventEmitter. |
||
Reference to the parent model of a multiroute. |
||
The route data. The following fields are available:
|
Events
Name |
Description |
Updating the model with new data. Instance of the Event class. Names of fields that are available via the Event.get method:
|
Methods
Name |
Returns |
Description |
destroy() |
Destroys a model. |
|
getPaths() |
Returns array of route paths. |
|
getType() |
String |
Returns ID of the route type. For pedestrian routes, returns the string "pedestrian". |
Updates the state of the model. |
Fields details
multiRoute
{multiRouter.MultiRouteModel} multiRoute
Reference to the parent model of a multiroute.
properties
{data.Manager} properties
The route data. The following fields are available:
- index: Integer - The ordinal number of the route in a multiroute.
- type: String - The route type identifier; takes the value "pedestrian" for pedestrian routes.
- 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 describes the travel time of the route in seconds.
- boundedBy: Number[][] - Coordinates of the upper and lower corners of the rectangle that bounds the route.
Events details
update
Updating the model with new data. Instance of the Event class. Names of fields that are available via the Event.get method:
- pathsChange: Boolean - Flag for whether the set of paths is changed.
Methods details
destroy
{} destroy()
Destroys a model.
getPaths
{multiRouter.pedestrian.PathModel[]} getPaths()
Returns array of route paths.
getType
{String} getType()
Returns ID of the route type. For pedestrian routes, returns the string "pedestrian".
update
{} update(routeJson)
Updates the state of the model.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Object JSON data. |
* Mandatory parameter/option.
Mandatory parameter/option.