Home > @magiclane/maps-sdk > PTCrowdingInfo
PTCrowdingInfo class
Live vehicle crowding information.
Every field is optional, ALWAYS - old producer realtime data degrades to a subset (e.g. vehicles + congestionLevel only), so consumers must treat each field independently.
Provided as PTTrip.vehicle (live crowding of the vehicle running exactly that trip instance) and as PTRouteInfo.liveCrowding (worst values over the route's fresh vehicles).
Maps & 3D Scene
Signature:
export declare class PTCrowdingInfo Constructors
Constructor | Modifiers | Description |
|---|---|---|
(constructor)({ vehicles, congestionLevel, occupancyStatus, occupancyPercentage, }, input) | Create a PTCrowdingInfo. API users do not typically create instances of this class directly. |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| (Optional) Congestion level reported by the vehicle(s). | ||
| number | (Optional) Occupancy percentage, 0..100+ (may exceed 100 per the GTFS-RT spec). | |
| (Optional) Occupancy status reported by the vehicle(s). | ||
| number | (Optional) Number of fresh vehicle positions on the route. Only set for PTRouteInfo.liveCrowding; always undefined for PTTrip.vehicle. |