Skip to content

Commit 1a9073c

Browse files
authored
User markers (#67)
1 parent 9ce9c60 commit 1a9073c

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/rando_planner/leaflet.clj

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@
2424
(if (and (:gpx plan)
2525
(:daily-plans plan))
2626
(assoc plan :markers
27-
(map (fn [pp]
28-
(assoc pp :popup-message
29-
(str "<small>"
30-
"<strong>" (:label pp) "</strong>"
31-
"<br />"
32-
(Math/floor (:kilometers pp))
33-
" km / ("
34-
(Math/floor (:cumulative-distance pp))
35-
" km) ▲ "
36-
(Math/floor (:elevation pp))
37-
"</small>")))
38-
(butlast (plan/daily-stats plan))))
27+
(concat (:markers plan '())
28+
(map (fn [pp]
29+
(assoc pp :popup-message
30+
(str "<small>"
31+
"<strong>" (:label pp) "</strong>"
32+
"<br />"
33+
(Math/floor (:kilometers pp))
34+
" km / ("
35+
(Math/floor (:cumulative-distance pp))
36+
" km) ▲ "
37+
(Math/floor (:elevation pp))
38+
"</small>")))
39+
(butlast (plan/daily-stats plan)))))
3940
plan))
4041

4142
(defn add-km-markers [plan]

0 commit comments

Comments
 (0)