Skip to content

Interface: CalculationResult

Response from a calculation request. Contains the start location, each destination with its computed distance, and a status message.

message values: the baseline V2.11/V2.12/V2.13/V3.0.0 TypeDoc emitted "DataValidation | DataNotLoaded" as a single string literal — a typo inherited across four releases. The API at runtime emits "DataNotLoaded" (plain), e.g. when calculateDistance is called before the building graph is loaded (docs/tutorials/distance-calculation.md:133). Split into two literals so TS consumers can narrow correctly.

Properties

PropertyType
destinations{ destination: LocationData; distance: string; }[]
message"Success" | "Failed" | "DataValidation" | "DataNotLoaded"
startLocationData