Commit c8a66d2
authored
fix(wingbits): clamp bbox coords to valid geographic ranges before API call (koala73#2453)
Map projections can send lamin/lamax outside [-90,90] (e.g. a zoomed-out
viewport). The isFinite validation passes these through, but Wingbits rejects
la < -90 with a Zod too_small error (HTTP 400). Clamp all four bbox values
to valid lat/lon ranges before computing centerLat/centerLon so the API
payload is always valid regardless of what the client sends.1 parent 6b4dadf commit c8a66d2
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3421 | 3421 | | |
3422 | 3422 | | |
3423 | 3423 | | |
3424 | | - | |
3425 | | - | |
3426 | | - | |
3427 | | - | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
3428 | 3434 | | |
3429 | 3435 | | |
3430 | 3436 | | |
| |||
0 commit comments