diff --git a/pkgs/maps/main.fnl b/pkgs/maps/main.fnl index 45043e8..c249c49 100644 --- a/pkgs/maps/main.fnl +++ b/pkgs/maps/main.fnl @@ -113,7 +113,7 @@ label.readout { (g:fill) (each [_ line (pairs lines)] - (case line + (case line.points [[sx sy] & more] (do (g:save) @@ -128,8 +128,8 @@ label.readout { (g:stroke) (g:restore)))) - (each [_ line (pairs lines)] - (case line + (each [_ line (pairs lines)] + (case line.points [[sx sy] & more] (do (g:save) diff --git a/pkgs/maps/tiles.fnl b/pkgs/maps/tiles.fnl index a052a76..c953d67 100644 --- a/pkgs/maps/tiles.fnl +++ b/pkgs/maps/tiles.fnl @@ -69,11 +69,15 @@ (tset lines e.id - (icollect [_ nd (ipairs e.nodes)] - (let [node (. nodes nd) - (tx ty) (latlon->tile node.lat node.lon zoom)] - ;;(print e.tags.name e.id e.name node.lat node.lon) - [ tx ty ]))))) + { + :name (?. e :tags :name) + :points + (icollect [_ nd (ipairs e.nodes)] + (let [node (. nodes nd) + (tx ty) (latlon->tile node.lat node.lon zoom)] + ;;(print e.tags.name e.id e.name node.lat node.lon) + [ tx ty ])) + }))) lines))