Coordinates
Coordinates is a small helper class for { lat, lon } payloads.
Constructor
Signature: new Coordinates(raw?: CoordinatesData)
Creates a coordinates object.
Methods
| Method | Signature | Purpose |
|---|---|---|
getRaw |
getRaw(): CoordinatesData |
Return current coordinates payload |
setRaw |
setRaw(value: CoordinatesData): this |
Replace coordinates payload |
setLat |
setLat(lat: number): this |
Set latitude |
setLon |
setLon(lon: number): this |
Set longitude |
getRaw()
Returns current CoordinatesData.
setRaw(value)
Replaces full coordinates payload.
setLat(lat)
Sets latitude.
setLon(lon)
Sets longitude.
Example
import { Coordinates } from '@geoapify/route-planner-sdk';
const point = new Coordinates().setLat(52.52).setLon(13.38);
CoordinatesData Interface
This is the original plain data object shape used in API payloads (request/response), not the SDK wrapper class.