UNPKG

@stadiamaps/api

Version:
137 lines 5.51 kB
import { CostingModel } from './CostingModel'; import { CostingOptions } from './CostingOptions'; import { RoutingWaypoint } from './RoutingWaypoint'; import { AnnotationFilters } from './AnnotationFilters'; import { DistanceUnit } from './DistanceUnit'; import { RoutingLanguages } from './RoutingLanguages'; /** * * @export * @interface RouteRequest */ export interface RouteRequest { /** * * @type {DistanceUnit} * @memberof RouteRequest */ units?: DistanceUnit; /** * * @type {RoutingLanguages} * @memberof RouteRequest */ language?: RoutingLanguages; /** * The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. * @type {string} * @memberof RouteRequest */ directionsType?: RouteRequestDirectionsTypeEnum; /** * The output response format. The default JSON format is extremely compact and ideal for web or data-constrained use cases where you want to fetch additional attributes on demand in small chunks. The OSRM format is much richer and is configurable with significantly more info for turn-by-turn navigation use cases. * @type {string} * @memberof RouteRequest */ format?: RouteRequestFormatEnum; /** * Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format. * @type {boolean} * @memberof RouteRequest */ bannerInstructions?: boolean; /** * Optionally includes voice instructions with timing information for turn-by-turn navigation. This is only available in the OSRM format. * @type {boolean} * @memberof RouteRequest */ voiceInstructions?: boolean; /** * * @type {AnnotationFilters} * @memberof RouteRequest */ filters?: AnnotationFilters; /** * An identifier to disambiguate requests (echoed by the server). * @type {string} * @memberof RouteRequest */ id?: string; /** * * @type {Array<RoutingWaypoint>} * @memberof RouteRequest */ locations: Array<RoutingWaypoint>; /** * * @type {CostingModel} * @memberof RouteRequest */ costing: CostingModel; /** * * @type {CostingOptions} * @memberof RouteRequest */ costingOptions?: CostingOptions; /** * This has the same format as the locations list. Locations are mapped to the closed road(s), and these road(s) are excluded from the route path computation. * @type {Array<RoutingWaypoint>} * @memberof RouteRequest */ excludeLocations?: Array<RoutingWaypoint>; /** * One or multiple exterior rings of polygons in the form of nested JSON arrays. Roads intersecting these rings will be avoided during path finding. Open rings will be closed automatically. If you only need to avoid a few specific roads, it's much more efficient to use `exclude_locations`. * @type {Array<Array<Array<number>>>} * @memberof RouteRequest */ excludePolygons?: Array<Array<Array<number>>>; /** * How many alternate routes are desired. Note that fewer or no alternates may be returned. Alternates are not yet supported on routes with more than 2 locations or on time-dependent routes. * @type {number} * @memberof RouteRequest */ alternates?: number; /** * If greater than zero, attempts to include elevation along the route at regular intervals. The "native" internal resolution is 30m, so we recommend you use this when possible. This number is interpreted as either meters or feet depending on the unit parameter. * Elevation for route sections containing a bridge or tunnel is interpolated linearly. This doesn't always match the true elevation of the bridge/tunnel, but it prevents sharp artifacts from the surrounding terrain. This functionality is unique to the routing endpoints and is not available via the elevation API. * NOTE: This has no effect on the OSRM response format. * @type {number} * @memberof RouteRequest */ elevationInterval?: number; /** * Determines whether the output should include roundabout exit instructions. * @type {boolean} * @memberof RouteRequest */ roundaboutExits?: boolean; } /** * @export */ export declare const RouteRequestDirectionsTypeEnum: { readonly None: "none"; readonly Maneuvers: "maneuvers"; readonly Instructions: "instructions"; }; export type RouteRequestDirectionsTypeEnum = (typeof RouteRequestDirectionsTypeEnum)[keyof typeof RouteRequestDirectionsTypeEnum]; /** * @export */ export declare const RouteRequestFormatEnum: { readonly Json: "json"; readonly Osrm: "osrm"; }; export type RouteRequestFormatEnum = (typeof RouteRequestFormatEnum)[keyof typeof RouteRequestFormatEnum]; /** * Check if a given object implements the RouteRequest interface. */ export declare function instanceOfRouteRequest(value: object): value is RouteRequest; export declare function RouteRequestFromJSON(json: any): RouteRequest; export declare function RouteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RouteRequest; export declare function RouteRequestToJSON(json: any): RouteRequest; export declare function RouteRequestToJSONTyped(value?: RouteRequest | null, ignoreDiscriminator?: boolean): any; //# sourceMappingURL=RouteRequest.d.ts.map