@stadiamaps/api
Version:
Stadia Maps Geospatial APIs
166 lines • 7.2 kB
TypeScript
import { CostingOptions } from './CostingOptions';
import { MapMatchCostingModel } from './MapMatchCostingModel';
import { MapMatchTraceOptions } from './MapMatchTraceOptions';
import { AnnotationFilters } from './AnnotationFilters';
import { DistanceUnit } from './DistanceUnit';
import { RoutingLanguages } from './RoutingLanguages';
import { MapMatchWaypoint } from './MapMatchWaypoint';
/**
*
* @export
* @interface MapMatchRequest
*/
export interface MapMatchRequest {
/**
* An identifier to disambiguate requests (echoed by the server).
* @type {string}
* @memberof MapMatchRequest
*/
id?: string;
/**
* REQUIRED if `encoded_polyline` is not present. Note that `break` type locations are only supported when `shape_match` is set to `map_match`.
* @type {Array<MapMatchWaypoint>}
* @memberof MapMatchRequest
*/
shape?: Array<MapMatchWaypoint>;
/**
* REQUIRED if `shape` is not present. An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm). Note that the polyline must be encoded with 6 digits of precision rather than the default 5!
* @type {string}
* @memberof MapMatchRequest
*/
encodedPolyline?: string;
/**
*
* @type {MapMatchCostingModel}
* @memberof MapMatchRequest
*/
costing: MapMatchCostingModel;
/**
*
* @type {CostingOptions}
* @memberof MapMatchRequest
*/
costingOptions?: CostingOptions;
/**
* Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails.
* In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`.
* @type {string}
* @memberof MapMatchRequest
*/
shapeMatch?: MapMatchRequestShapeMatchEnum;
/**
*
* @type {DistanceUnit}
* @memberof MapMatchRequest
*/
units?: DistanceUnit;
/**
*
* @type {RoutingLanguages}
* @memberof MapMatchRequest
*/
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 MapMatchRequest
*/
directionsType?: MapMatchRequestDirectionsTypeEnum;
/**
* 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 MapMatchRequest
*/
format?: MapMatchRequestFormatEnum;
/**
* Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format.
* @type {boolean}
* @memberof MapMatchRequest
*/
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 MapMatchRequest
*/
voiceInstructions?: boolean;
/**
*
* @type {AnnotationFilters}
* @memberof MapMatchRequest
*/
filters?: AnnotationFilters;
/**
* The timestamp at the start of the trace. Combined with `durations`, this provides a way to include timing information for an `encoded_polyline` trace.
* @type {number}
* @memberof MapMatchRequest
*/
beginTime?: number;
/**
* A list of durations (in seconds) between each successive pair of points in a polyline.
* @type {number}
* @memberof MapMatchRequest
*/
durations?: number;
/**
* If true, the input timestamps or durations should be used when computing elapsed time for each edge along the matched path rather than the routing algorithm estimates.
* @type {boolean}
* @memberof MapMatchRequest
*/
useTimestamps?: boolean;
/**
*
* @type {MapMatchTraceOptions}
* @memberof MapMatchRequest
*/
traceOptions?: MapMatchTraceOptions;
/**
* If true, the response will include a `linear_references` value that contains an array of base64-encoded [OpenLR location references](https://www.openlr-association.com/fileadmin/user_upload/openlr-whitepaper_v1.5.pdf), one for each graph edge of the road network matched by the trace.
* @type {boolean}
* @memberof MapMatchRequest
*/
linearReferences?: boolean;
/**
* 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 MapMatchRequest
*/
elevationInterval?: number;
}
/**
* @export
*/
export declare const MapMatchRequestShapeMatchEnum: {
readonly EdgeWalk: "edge_walk";
readonly MapSnap: "map_snap";
readonly WalkOrSnap: "walk_or_snap";
};
export type MapMatchRequestShapeMatchEnum = (typeof MapMatchRequestShapeMatchEnum)[keyof typeof MapMatchRequestShapeMatchEnum];
/**
* @export
*/
export declare const MapMatchRequestDirectionsTypeEnum: {
readonly None: "none";
readonly Maneuvers: "maneuvers";
readonly Instructions: "instructions";
};
export type MapMatchRequestDirectionsTypeEnum = (typeof MapMatchRequestDirectionsTypeEnum)[keyof typeof MapMatchRequestDirectionsTypeEnum];
/**
* @export
*/
export declare const MapMatchRequestFormatEnum: {
readonly Json: "json";
readonly Osrm: "osrm";
};
export type MapMatchRequestFormatEnum = (typeof MapMatchRequestFormatEnum)[keyof typeof MapMatchRequestFormatEnum];
/**
* Check if a given object implements the MapMatchRequest interface.
*/
export declare function instanceOfMapMatchRequest(value: object): value is MapMatchRequest;
export declare function MapMatchRequestFromJSON(json: any): MapMatchRequest;
export declare function MapMatchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MapMatchRequest;
export declare function MapMatchRequestToJSON(json: any): MapMatchRequest;
export declare function MapMatchRequestToJSONTyped(value?: MapMatchRequest | null, ignoreDiscriminator?: boolean): any;
//# sourceMappingURL=MapMatchRequest.d.ts.map