@stadiamaps/api
Version:
Stadia Maps Geospatial APIs
150 lines • 4.74 kB
TypeScript
import { OsrmIntersection } from './OsrmIntersection';
import { OsrmStepManeuver } from './OsrmStepManeuver';
import { OsrmBannerInstruction } from './OsrmBannerInstruction';
import { OsrmVoiceInstruction } from './OsrmVoiceInstruction';
/**
* A maneuver such as a turn or merge, followed by travel along a single road or path.
* @export
* @interface OsrmRouteStep
*/
export interface OsrmRouteStep {
/**
* The distance traveled by the route, in meters.
* @type {number}
* @memberof OsrmRouteStep
*/
distance: number;
/**
* The estimated travel time, in number of seconds.
* @type {number}
* @memberof OsrmRouteStep
*/
duration: number;
/**
* An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) with 6 digits of decimal precision (NOTE: most implementations default to 5).
* @type {string}
* @memberof OsrmRouteStep
*/
geometry: string;
/**
*
* @type {number}
* @memberof OsrmRouteStep
*/
weight?: number;
/**
* The name of the segment (ex: road) being traversed
* @type {string}
* @memberof OsrmRouteStep
*/
name?: string;
/**
* A reference number of code for the segment being traversed.
* @type {string}
* @memberof OsrmRouteStep
*/
ref?: string;
/**
* Pronunciation of the name (if available). The format of this varies by implementation/vendor.
* @type {string}
* @memberof OsrmRouteStep
*/
pronunciation?: string;
/**
*
* @type {string}
* @memberof OsrmRouteStep
*/
destinations?: string;
/**
*
* @type {string}
* @memberof OsrmRouteStep
*/
exits?: string;
/**
* The mode of travel.
* @type {string}
* @memberof OsrmRouteStep
*/
mode: string;
/**
*
* @type {OsrmStepManeuver}
* @memberof OsrmRouteStep
*/
maneuver: OsrmStepManeuver;
/**
*
* @type {Array<OsrmIntersection>}
* @memberof OsrmRouteStep
*/
intersections?: Array<OsrmIntersection>;
/**
* The name of the traffic circle.
* @type {string}
* @memberof OsrmRouteStep
*/
rotaryName?: string;
/**
* Pronunciation of the rotary name (if available). The format of this varies by implementation/vendor.
* @type {string}
* @memberof OsrmRouteStep
*/
rotaryPronunciation?: string;
/**
* The side of the road on which driving is legal for this step.
* @type {string}
* @memberof OsrmRouteStep
*/
drivingSide?: OsrmRouteStepDrivingSideEnum;
/**
* A list of announcements which should be spoken at various points along the maneuver.
* @type {Array<OsrmVoiceInstruction>}
* @memberof OsrmRouteStep
*/
voiceInstructions?: Array<OsrmVoiceInstruction>;
/**
* A list of announcements which should be displayed prominently on screen at various points along the maneuver.
* @type {Array<OsrmBannerInstruction>}
* @memberof OsrmRouteStep
*/
bannerInstructions?: Array<OsrmBannerInstruction>;
/**
* The style of speed limit signs used along the step.
* @type {string}
* @memberof OsrmRouteStep
*/
speedLimitSign?: OsrmRouteStepSpeedLimitSignEnum;
/**
* The unit of measure that is used locally along the step. This may be different from the unit used in maxspeed annotations, and is provided so that apps can localize their display.
* @type {string}
* @memberof OsrmRouteStep
*/
speedLimitUnit?: string;
}
/**
* @export
*/
export declare const OsrmRouteStepDrivingSideEnum: {
readonly Left: "left";
readonly Right: "right";
};
export type OsrmRouteStepDrivingSideEnum = (typeof OsrmRouteStepDrivingSideEnum)[keyof typeof OsrmRouteStepDrivingSideEnum];
/**
* @export
*/
export declare const OsrmRouteStepSpeedLimitSignEnum: {
readonly Mutcd: "mutcd";
readonly Vienna: "vienna";
};
export type OsrmRouteStepSpeedLimitSignEnum = (typeof OsrmRouteStepSpeedLimitSignEnum)[keyof typeof OsrmRouteStepSpeedLimitSignEnum];
/**
* Check if a given object implements the OsrmRouteStep interface.
*/
export declare function instanceOfOsrmRouteStep(value: object): value is OsrmRouteStep;
export declare function OsrmRouteStepFromJSON(json: any): OsrmRouteStep;
export declare function OsrmRouteStepFromJSONTyped(json: any, ignoreDiscriminator: boolean): OsrmRouteStep;
export declare function OsrmRouteStepToJSON(json: any): OsrmRouteStep;
export declare function OsrmRouteStepToJSONTyped(value?: OsrmRouteStep | null, ignoreDiscriminator?: boolean): any;
//# sourceMappingURL=OsrmRouteStep.d.ts.map