公交路段

interface TransitSegment {
    distance: number;
    distanceText: string;
    path?: NormalizedLocation[];
    type: "transit";
    subType:
        | "bus"
        | "subway"
        | "ferry"
        | "train"
        | "airplane"
        | "coach";
    lineName: string;
    onStop: string;
    offStop: string;
    stopCount: number;
    duration?: number;
}

Hierarchy (view full)

Properties

distance: number

距离(米)

distanceText: string

距离文本

路径坐标点(可选)

type

路段类型

subType:
    | "bus"
    | "subway"
    | "ferry"
    | "train"
    | "airplane"
    | "coach"

交通工具类型

lineName: string

线路名称

onStop: string

上车站

offStop: string

下车站

stopCount: number

途经站数

duration?: number

行驶时长(秒,可选)