Home > @magiclane/maps-sdk > PTRoute

PTRoute class

Public transport route class

Routes & Navigation

Signature:

export declare class PTRoute extends RouteBase 

Extends: RouteBase

Constructors

Constructor

Modifiers

Description

(constructor)(id, mapId)

Constructs a new instance of the PTRoute class

Properties

Property

Modifiers

Type

Description

countBuyTicketInformation

readonly

number

Get number of BuyTicketInformation objects for PT route.

**Returns**

* Number of BuyTicketInformation objects.

**Throws**

* An exception if it fails.

publicTransportFare

readonly

string | null

Get Fare

**Returns**

* Fare of the route.

**Throws**

* An exception if it fails.

publicTransportFrequency

readonly

number

Get Frequency

**Returns**

* Frequency of the route.

**Throws**

* An exception if it fails.

publicTransportRespectsAllConditions

readonly

boolean

Check if the solution meets all the preferences

**Returns**

* True if the solution meets all the preferences, false otherwise.

**Throws**

* An exception if it fails.

Methods

Method

Modifiers

Description

getBuyTicketInformation(index)

Get buy ticket data obj specified by index.

**Parameters**

* **IN** *index* The index of the buy ticket data object.

**Returns**

* Valid PTBuyTicketInformation object for corresponding index. * Empty PTBuyTicketInformation object if id index is out of bounds.

**Throws**

* An exception if it fails.