Home > @magiclane/maps-sdk > PTTrip

PTTrip class

A scheduled public transport trip instance.

Represents a single scheduled run of a route with times, delays, cancellation and accessibility metadata.

Maps & 3D Scene

Signature:

export declare class PTTrip 

Constructors

Constructor

Modifiers

Description

(constructor)({ route, agency, tripIndex, tripDate, hasRealtime, departureTime, isCancelled, delayMinutes, stopTimes, stopIndex, stopPlatformCode, isWheelchairAccessible, isBikeAllowed, }, input)

Create a PTTrip.

API users do not typically create instances of this class directly.

Properties

Property

Modifiers

Type

Description

agency

PTAgency

The agency operating the trip.

delayMinutes?

number

(Optional) Delay in minutes (may be null).

departureTime?

Date

(Optional) Departure time (UTC flag, local value).

**WARNING:** Returned as a Date with UTC flag but representing local time; use TimezoneService to convert if needed.

hasRealtime

boolean

Whether realtime information is available.

isBikeAllowed

boolean

Indicates whether bikes are allowed on the trip.

isCancelled?

boolean

(Optional) Optional cancellation flag.

isWheelchairAccessible

boolean

Wheelchair accessibility flag.

route

PTRouteInfo

The route associated with the trip.

stopIndex

number

Index of the current/selected stop within stopTimes.

stopPlatformCode?

string

(Optional) Platform code for the stop (may be null).

stopTimes

PTStopTime[]

The list of stop times for this trip.

tripDate?

readonly

Date

(Optional) Trip date (UTC flag, local value).

**WARNING:** Returned as a Date with UTC flag but representing local time; use TimezoneService to convert if needed.

tripIndex

readonly

number

Internal trip index.