fix two more off-by-one errors

- we were incrementing num-tiles, no need to
- the overpass fetcher was fetcing one tile too far left
This commit is contained in:
Daniel Barlow 2025-06-02 13:43:39 +01:00
parent 380c5e7410
commit b70c72fcfe
2 changed files with 5 additions and 4 deletions

View File

@ -135,8 +135,8 @@ label.readout {
(let [map-surface
(window:create_similar_surface
cairo.Content.COLOR
(* tile-size (+ 1 num-tiles-x))
(* tile-size (+ 1 num-tiles-y)))
(* tile-size num-tiles-x)
(* tile-size num-tiles-y))
g (cairo.Context.create map-surface)]
(g:set_source_rgb 1 1 1)

View File

@ -47,9 +47,10 @@
(fn overpass [lat lon zoom]
(let [width (/ 360 (^ 2 zoom))
n (+ lat width) ;XXX adjust for latitude
w (- lon width)
w lon ; (- lon width)
s lat
e lon]
e (+ lon width)
]
(->
[
"[out:json];"