extract tile-name
This commit is contained in:
parent
4edf246cf6
commit
406cedbce1
@ -109,8 +109,11 @@
|
|||||||
;; we'd like to have a way for completed background fetch to signal
|
;; we'd like to have a way for completed background fetch to signal
|
||||||
;; so that the map can be redrawn
|
;; so that the map can be redrawn
|
||||||
|
|
||||||
|
(fn tile-name [x y zoom]
|
||||||
|
(.. x "_" y "_" zoom))
|
||||||
|
|
||||||
(fn polylines [cq x y zoom cb]
|
(fn polylines [cq x y zoom cb]
|
||||||
(let [k (.. x "_" y "_" zoom)
|
(let [k (tile-name x y zoom)
|
||||||
pathname (.. "/tmp/tiles/" k ".json")]
|
pathname (.. "/tmp/tiles/" k ".json")]
|
||||||
(if (file-exists? pathname)
|
(if (file-exists? pathname)
|
||||||
(let [data (with-open [i (io.open pathname :r)] (i:read "*a"))]
|
(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 }
|
||||||
|
Loading…
Reference in New Issue
Block a user