Documentation
Reference
2.1.50 (current version)
collection
interactivityModel
Interfaces
2.1.52 (release candidate)
collection
interactivityModel
Interfaces

multiRouter.masstransit.Route

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

Extends IGeoObject.

Displaying an individual route of public transport. A multi-stop route can consist of several individual routes.

Fields | Events | Methods

Creates the representation to display an individual route of public transport.

Fields

NameTypeDescription
eventsIEventManager

Event manager.

Inherited from IDomEventEmitter.

geometryIGeometry|null

Geo object geometry.

Inherited from IGeoObject.

modelmultiRouter.masstransit.RouteModel

The data model of an individual route.

optionsIOptionManager

Options manager.

Inherited from ICustomizable.

propertiesdata.Manager

The route data. The following fields are available:

  • index: Integer - The ordinal number of the route in a multi-stop route.
  • type: String - Route type identifier, which takes the value "masstransit" for public transport 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 specifies the travel time of the route in seconds.
  • boundedBy: Number[][] - Coordinates of the upper and lower corners of the rectangle that bounds the route.

stateIDataManager

State of the geo object.

Inherited from IGeoObject.

Events

NameDescription
click

Single left-click on the object. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

contextmenu

Calls the element's context menu. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

dblclick

Double left-click on the object. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

geometrychange

Change to the geo object geometry. Instance of the Event class. Names of fields that are available via the Event.get method:

  • originalEvent: IEvent - Original event of the geometry.

Inherited from IGeoObject.

mapchange

Map reference changed. Data fields:

  • oldMap - Old map.
  • newMap - New map.

Inherited from IParentOnMap.

mousedown

Pressing the mouse button over the object. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mouseenter

Pointing the cursor at the object. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mouseleave

Moving the cursor off of the object. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mousemove

Moving the cursor over the object. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mouseup

Letting go of the mouse button over an object. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

multitouchend

End of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface.

Inherited from IDomEventEmitter.

multitouchmove

Repeating event during multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Defines the touches property, which contains a list of touches. Every touch is described by an object that contains the following fields:

  • clientX - X coordinate of the touch relative to the viewable area of the browser.
  • clientY - Y coordinate of the touch relative to the viewable area of the browser.
  • pageX - X coordinate of the touch relative to the beginning of the document.
  • pageY - Y coordinate of the touch relative to the beginning of the document.

Inherited from IDomEventEmitter.

multitouchstart

Start of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Defines the touches property, which contains a list of touches. Every touch is described by an object that contains the following fields:

  • clientX - X coordinate of the touch relative to the viewable area of the browser.
  • clientY - Y coordinate of the touch relative to the viewable area of the browser.
  • pageX - X coordinate of the touch relative to the beginning of the document.
  • pageY - Y coordinate of the touch relative to the beginning of the document.

Inherited from IDomEventEmitter.

optionschange

Change to the object options.

Inherited from ICustomizable.

overlaychange

Change to the geo object overlay. Instance of the Event class. Names of fields that are available via the Event.get method:

  • overlay: IOverlay|null - Reference to the overlay.
  • oldOverlay: IOverlay|null - Previous overlay of the geo object.

Inherited from IGeoObject.

parentchange

The parent object reference changed.

Data fields:

  • oldParent - Old parent.
  • newParent - New parent.

Inherited from IChild.

propertieschange

Change to the geo object data. Instance of the Event class. Names of fields that are available via the Event.get method:

  • originalEvent: IEvent - Original event of the data manager.

Inherited from IGeoObject.

update

Updating the route rendering. Instance of the Event class.

wheel

Mouse wheel scrolling. When using, keep in mind that mouse events are emulated when a touch screen is used. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

Methods

NameReturnsDescription
getMap()

Map

Returns reference to the map.

Inherited from IParentOnMap.

getOverlay()

vow.Promise

Returns the promise object, which is confirmed by the overlay object at the time it is actually created, or is rejected with an appropriate error message.

Inherited from IGeoObject.

getOverlaySync()

IOverlay|null

The method provides synchronous access to the overlay.

Inherited from IGeoObject.

getParent()

IControlParent|null

Returns link to the parent object, or null if the parent element was not set.

Inherited from IChildOnMap.

getPaths()

GeoObjectCollection

Returns a child collection of paths that make up the route.

setParent(parent)

IChildOnMap

Sets the parent object. If the null value is passed, the manager element will only be deleted from the current parent object.

Inherited from IChildOnMap.

Fields details

model

The data model of an individual route.

properties

{data.Manager} properties

The route data. The following fields are available:

  • index: Integer - The ordinal number of the route in a multi-stop route.
  • type: String - Route type identifier, which takes the value "masstransit" for public transport 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 specifies 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 route rendering. Instance of the Event class.

Methods details

getPaths

{GeoObjectCollection} getPaths()

Returns a child collection of paths that make up the route.