@geoapify/route-planner-sdk
Version:
TypeScript SDK for the Geoapify Route Planner API. Supports route optimization, delivery planning, and timeline visualization in browser and Node.js
26 lines (25 loc) • 483 B
JavaScript
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;
}
}