UNPKG

mobility-toolbox-js

Version:

Toolbox for JavaScript applications in the domains of mobility and logistics.

65 lines (64 loc) 1.88 kB
import type { AnyCanvasContext, RealtimeLine, RealtimeMot } from '../../types'; /** * @private */ export declare const MOTS_ONLY_RAIL: RealtimeMot[]; /** * @private */ export declare const MOTS_WITH_CABLE: RealtimeMot[]; /** * @private */ export declare const MOTS_WITHOUT_CABLE: RealtimeMot[]; /** * @private */ export declare const MOTS_ALL: RealtimeMot[]; /** * Trajserv value: 'Tram', 'Subway / Metro / S-Bahn', 'Train', 'Bus', 'Ferry', 'Cable Car', 'Gondola', 'Funicular', 'Long distance bus', 'Rail', * New endpoint use Rail instead of Train. * New tracker values: null, "tram", "subway", "rail", "bus", "ferry", "cablecar", "gondola", "funicular", "coach". * * @private */ export declare const types: RegExp[]; /** * @private */ export declare const bgColors: string[]; /** * @private */ export declare const textColors: string[]; /** * @private */ export declare const getTypeIndex: (type: RealtimeMot) => number; /** * @private */ export declare const getRadius: (type: RealtimeMot, zoom: number) => number; /** * @private */ export declare const getBgColor: (type: RealtimeMot, line?: RealtimeLine) => string; /** * @private */ export declare const getTextColor: (type: RealtimeMot) => string; /** * @private */ export declare const getTextSize: (ctx: AnyCanvasContext, markerSize: number, text: string, fontSize: number, getTextFont: (fontSize: number, text?: string) => string) => number; /** * @private * @param {number} delayInMs Delay in milliseconds. * @param {boolean} cancelled true if the journey is cancelled. * @param {boolean} isDelayText true if the color is used for delay text of the symbol. */ export declare const getDelayColor: (delayInMs: null | number, cancelled?: boolean, isDelayText?: boolean) => string; /** * @private */ export declare const getDelayText: (delayInMs: number, cancelled: boolean) => string;