UNPKG

@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

30 lines (29 loc) 621 B
import { Coordinates } from "./coordinates"; export class Avoid { constructor(raw) { if (raw) { this.raw = raw; } else { this.raw = { values: [] }; } } getRaw() { return this.raw; } setRaw(value) { this.raw = value; return this; } setType(type) { this.raw.type = type; return this; } addValue(lon, lat) { let newCoordinates = new Coordinates().setLat(lat).setLon(lon); this.raw.values.push(newCoordinates.getRaw()); return this; } }