UNPKG

@geoapify/route-planner-sdk

Version:

A TypeScript SDK for the Geoapify Route Planner API that simplifies route optimization requests, and helps visualize and edit resulting routes.

26 lines (25 loc) 483 B
export class RouteLegStep { constructor(raw) { if (raw) { this.raw = raw; } else { throw new Error("RouteLegStepData is undefined"); } } getRaw() { return this.raw; } getDistance() { return this.raw.distance; } getTime() { return this.raw.time; } getFromIndex() { return this.raw.from_index; } getToIndex() { return this.raw.to_index; } }