                    [start-lat start-lng])
                  lat-lngs)
                 [[(:end-lat last-lat-lng) (:end-lng last-lat-lng)]])
-         map-bounds (max-box-corners lat-lngs)]
-     ;; draw start/end points
-     (-> L (.circle (vec start-point) 8 {:color "green"})
-         (.addTo m))
-     (-> L (.circle (vec end-point) 8 {:color "red"})
-         (.addTo m))
-     ;; draw map directions
-     (-> L (.polyline lines)
-         (.addTo m)) 
+         map-bounds (max-box-corners lat-lngs)
+         start-circle (-> L (.circle (vec start-point) 8 {:color "green"}))
+         end-circle (-> L (.circle (vec end-point) 8 {:color "red"}))
+         lines (-> L (.polyline lines))]
+     ;; draw directions
+     (doseq [l [start-circle end-circle lines]]
+       (.addLayer directions-layer l))
+     (.addTo directions-layer m)
      (.fitBounds m
                  [[(:sw-lat map-bounds) (:sw-lng map-bounds)]
                   [(:ne-lat map-bounds) (:ne-lng map-bounds)]])

        (.start (.create js/Ladda ;; starts loading spinner
                         (dom/getElement "btn-go")))
        ;; clear existing map's directions
        (remove-explanation-text) ;; clear text (if not already cleared)
        (direction-steps mappy (from-query) (to-query)) ;; draw map's directions
        )))

(defn geolocation [position]

  (.setAttribute (dom/getElement "biz-container")
                 "class" "col-md-4"))

(defn hide-biz-sidebar []
  (.setAttribute (dom/getElement "map-container")
                 "class" "col-md-12")
  (.setAttribute (dom/getElement "biz-container")
                 "class" ""))
(defn clear-biz-sidebar []
  (let [sidebar (dom/getElement "biz-container")]
    (dom/removeChildren sidebar)))

(defn setup-map [m lat lng]
  (-> m (.setView [lat lng] 12))
