Appearance
Function: calculateDistance()
ts
function calculateDistance(request): Promise<CalculationResult>;Calculate the walking distance between a start point and one or more destinations.
Sends the request to the iframe's routing engine and awaits the response. The returned CalculationResult contains per-destination distances in metres and estimated walking times.
Parameters
| Parameter | Type |
|---|---|
request | CalculationRequest |
Returns
Promise<CalculationResult>
Throws
MAPSTED-1012 when request.start is missing.
Throws
MAPSTED-1012 when request.destinations is empty or not an array.
Throws
MAPSTED-1090 when the API is not READY.