Home > @magiclane/maps-sdk > PTAlertInfo
PTAlertInfo class
GTFS-RT service alert.
A single deduplicated list of alerts is carried per response (PTStopInfo.alerts); trips and stops reference the shared instances (PTTrip.alerts, PTStop.alerts). Absent and empty are equivalent - alerts appear only when the server has realtime alerts enabled and something applies.
Maps & 3D Scene
Signature:
export declare class PTAlertInfo Constructors
Constructor | Modifiers | Description |
|---|---|---|
Create a PTAlertInfo. API users do not typically create instances of this class directly. |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| Active periods. Empty = active as long as the feed carries the alert. | ||
| Alert cause. Out-of-range feed values map to UnknownCause. | ||
| Agency-specific cause wording translations (may be empty). | ||
| Description text translations (may be empty). | ||
| Alert effect. Out-of-range feed values map to UnknownEffect. | ||
| Agency-specific effect wording translations (may be empty). | ||
| Header text translations (may be empty). | ||
| (Optional) Alert severity; undefined when the feed supplies none. | ||
| URL translations (may be empty). |
Methods
Method | Modifiers | Description |
|---|---|---|
Cause detail for the given language (see PTAlertInfo.selectTranslation()). | ||
Description text for the given language (see PTAlertInfo.selectTranslation()). | ||
Effect detail for the given language (see PTAlertInfo.selectTranslation()). | ||
Header text for the given language (see PTAlertInfo.selectTranslation()). | ||
| Select the best translation for a language. Exact match on language, else the first entry; undefined when the list is empty. | |
URL for the given language (see PTAlertInfo.selectTranslation()). |