import { LngLatLike } from 'maplibre-gl'; import { TravelMode, AvoidType, ApproachType } from '@src/common/interface'; import { NBRequestStatus } from './common'; export interface DistanceMatrixRequest { /** Origins are the starting point of your route. Ensure that origins are a valid land location to calculate a route. Multiple origins are separated by a pipe symbol. */ origins: LngLatLike[]; /** Destinations are the ending coordinates of your route. Ensure that destinations are at a valid land location. Multiple destinations are separated by a pipe symbol. */ destinations: LngLatLike[]; /** Sets the time of departure. The response will return a route based on traffic for that specific departure time. */ departureTime?: number; /** A parameter which which sets the transportation mode for the route. PS: Only the 4w/car profile is enabled by default. The other customised routing profiles are only supported in premium plan. */ mode?: TravelMode | string; /** Setting this will ensure the route avoids ferry, tolls or highways. */ avoid?: AvoidType; /** A list indicating the side of the road from which to approach waypoints in a requested route. If provided, the number of approaches must be equal to the number of all points on the path. */ approaches?: ApproachType[]; /** * api key for the request */ apiKey?: string; } export interface DistanceMatrixResult { /** A string indicating the state of the response. This is a separate code than the HTTP status code. On normal valid responses, the value will be `Ok`. */ status: NBRequestStatus; /** Container object for response. Array of elements. Each row corresponds to one Origin.Each element object corresponds to a destination. */ rows: Array; /** error message if status is not 200. */ msg?: string; } export interface DistanceMatrixResponseRow { /** elements for a particular row|origin */ elements: Array; } export interface DistanceMatrixResponseElement { /** traveling distance between origin and destination. Unit: seconds */ distance: { value: number; }; /** traveling duration between origin and destination. Unit: seconds */ duration: { value: number; }; } export declare class DistanceMatrixService { getDistanceMatrix(opt: DistanceMatrixRequest): Promise; } //# sourceMappingURL=distance-matrix.d.ts.map