diff --git a/pkgs/maps/tiles.fnl b/pkgs/maps/tiles.fnl index d3a6688..436bf6e 100644 --- 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 }