biscuit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 406cedbce18f91f8d04064c939d72f8271c8f9e4
parent 4edf246cf66aabfc5e8ca8e42d9fa034a9307404
Author: Daniel Barlow <dan@telent.net>
Date:   Mon,  9 Jun 2025 13:19:47 +0100

extract tile-name

Diffstat:
Mpkgs/maps/tiles.fnl | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pkgs/maps/tiles.fnl b/pkgs/maps/tiles.fnl @@ -109,8 +109,11 @@ ;; we'd like to have a way for completed background fetch to signal ;; so that the map can be redrawn +(fn tile-name [x y zoom] + (.. x "_" y "_" zoom)) + (fn polylines [cq x y zoom cb] - (let [k (.. x "_" y "_" zoom) + (let [k (tile-name x y zoom) pathname (.. "/tmp/tiles/" k ".json")] (if (file-exists? pathname) (let [data (with-open [i (io.open pathname :r)] (i:read "*a"))] @@ -138,4 +141,4 @@ -{ : polylines : latlon->tile } +{ : polylines : latlon->tile :name tile-name }