Sports Lib API - v17.3.0
    Preparing search index...

    Interface RouteInterface

    A planned route with point-indexed streams, route metadata, and derived route statistics.

    interface RouteInterface {
        activityType: ActivityTypes | null;
        comment: string | null;
        creator: CreatorInterface;
        description: string | null;
        extensions?: unknown;
        links: RouteLinkInterface[];
        name: string | null;
        number: number | null;
        parseOptions: RouteParsingOptions;
        addDataToStream(type: string, index: number, value: number): this;
        addStat(stat: DataInterface<unknown>): void;
        addStream(stream: RouteStreamInterface): this;
        addStreams(streams: RouteStreamInterface[]): this;
        clearStats(): void;
        clearStreams(): this;
        createStream(type: string, length?: number): RouteStreamInterface;
        getAllExportableStreams(): RouteStreamInterface[];
        getAllStreams(): RouteStreamInterface[];
        getDistance(): DataDistance;
        getID(): string | null;
        getPointCount(): number;
        getPointData(): RoutePointInterface[];
        getPositionData(): (DataPositionInterface | null)[];
        getSquashedPositionData(): DataPositionInterface[];
        getSquashedStreamData(streamType: string): number[];
        getStat<TValue = DefaultDataValue>(
            statType: string,
        ): void | DataInterface<TValue>;
        getStats<TValue = DefaultDataValue>(): Map<string, DataInterface<TValue>>;
        getStatsAsArray<TValue = DefaultDataValue>(): DataInterface<TValue>[];
        getStream(type: string): RouteStreamInterface;
        getStreamData(streamType: string | RouteStreamInterface): (number | null)[];
        hasPositionData(): boolean;
        hasStreamData(streamType: string | RouteStreamInterface): boolean;
        removeStat(statType: string): void;
        removeStream(streamType: string | RouteStreamInterface): this;
        replaceStreamData(streamType: string, data: (number | null)[]): this;
        setDistance(distance: DataDistance): void;
        setID(id: string | null): this;
        setPoints(points: RoutePointInterface[]): this;
        toJSON(): RouteJSONInterface;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    activityType: ActivityTypes | null
    comment: string | null
    description: string | null
    extensions?: unknown
    name: string | null
    number: number | null
    parseOptions: RouteParsingOptions

    Methods

    • Parameters

      • type: string
      • index: number
      • value: number

      Returns this

    • Parameters

      • streamType: string
      • data: (number | null)[]

      Returns this