@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.
28 lines (27 loc) • 528 B
JavaScript
export class Break {
constructor(raw) {
if (raw) {
this.raw = raw;
}
else {
this.raw = {
time_windows: []
};
}
}
getRaw() {
return this.raw;
}
setRaw(value) {
this.raw = value;
return this;
}
addTimeWindow(start, end) {
this.raw.time_windows.push([start, end]);
return this;
}
setDuration(duration) {
this.raw.duration = duration;
return this;
}
}