@magiclane/maps-sdk
    Preparing search index...

    Class PTTrip

    A scheduled public transport trip instance.

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

    Index

    Constructors

    • Create a PTTrip.

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

      Parameters

      • params: {
            agency: PTAgency;
            delayMinutes?: number;
            departureTime?: Date;
            hasRealtime: boolean;
            isBikeAllowed: boolean;
            isCancelled?: boolean;
            isWheelchairAccessible: boolean;
            route: PTRouteInfo;
            stopIndex: number;
            stopPlatformCode?: string;
            stopTimes: PTStopTime[];
            tripDate?: Date;
            tripIndex: number;
        }

        Trip parameters

      Returns PTTrip

    Properties

    agency: PTAgency

    The agency operating the trip.

    delayMinutes?: number

    Delay in minutes (may be null).

    departureTime?: Date

    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 cancellation flag.

    isWheelchairAccessible: boolean

    Wheelchair accessibility flag.

    The route associated with the trip.

    stopIndex: number

    Index of the current/selected stop within stopTimes.

    stopPlatformCode?: string

    Platform code for the stop (may be null).

    stopTimes: PTStopTime[]

    The list of stop times for this trip.

    tripDate?: Date

    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: number

    Internal trip index.

    Methods