mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
2c3b20bb57
PAD-03 portages and locks on planned tours and recorded tracks, PAD-07 paddle time with portage and lock stops, PAD-08 wind forecast for the start, PAD-05A regional obstacle import from Geofabrik extracts with admin endpoints and a monthly refresh, PAD-05B first cut of the obstacle layer on Leaflet, GL and 3D. Work in progress: checklist (PAD-06), check bench (PAD-09), admin UI, translations and tests follow.
17 lines
641 B
TypeScript
17 lines
641 B
TypeScript
import { paddleObstaclesResponseSchema, type PaddleObstaclesResponse } from '@trek/shared';
|
|
import apiClient from './client';
|
|
|
|
/** PAD-05A: the paddle objects of a map area and how far TREK's data covers it. */
|
|
export const paddleObstaclesApi = {
|
|
inBox: (
|
|
box: { south: number; west: number; north: number; east: number },
|
|
signal?: AbortSignal
|
|
): Promise<PaddleObstaclesResponse> =>
|
|
apiClient
|
|
.get('/paddle/obstacles', {
|
|
params: { bbox: [box.south, box.west, box.north, box.east].map((v) => v.toFixed(5)).join(',') },
|
|
signal,
|
|
})
|
|
.then((r) => paddleObstaclesResponseSchema.parse(r.data)),
|
|
};
|