Open larsen opened 1 month ago
In the documentation it is advertised that one can visualize a GPX file simply using something like
(clerk/with-viewer leaflet/leaflet-gpx-viewer {:gpx "gpx/be-rostock.gpx"})
But this is broken, because the actual visualization code does:
(when (:points value) (let [point-groups (:grouped-by-day value)] (js/console.log (count point-groups)) (doall (for [[pp color] (map vector point-groups (take (count point-groups) (cycle '["#660e60","#893f71","#ac6f82","#cfa093","#f3d0a4"]) (cycle '["black" "yellow"])))] (.addTo (.polyline js/L (clj->js (map (fn [{lat :lat, lon :lon} p] [lat lon]) pp)) (clj->js {:color color})) @m)))) (.addTo (.marker js/L (clj->js [(:lat start) (:lon start)]) (clj->js {:icon start-icon})) @m) (.addTo (.marker js/L (clj->js [(:lat end) (:lon end)]) (clj->js {:icon end-icon})) @m))
which assumes the visualized data structure contains a :grouped-by-day key. But this is true only when a :daily-plans key has been specified
:grouped-by-day
:daily-plans
In the documentation it is advertised that one can visualize a GPX file simply using something like
But this is broken, because the actual visualization code does:
which assumes the visualized data structure contains a
:grouped-by-day
key. But this is true only when a:daily-plans
key has been specified