   (:require [mrhyde.extend-js]
             [blade :refer [L]]
             [cljs.core.async :refer [chan <! >! timeout]]
-            [shoreleave.remotes.http-rpc :refer [remote-callback]])
+            [shoreleave.remotes.http-rpc :refer [remote-callback]]
+            [domina :as dom]
+            [domina.events :as ev])
   (:require-macros [cljs.core.async.macros :refer [go]]
                    [shoreleave.remotes.macros :as macros]))
 


(defn addmarkers [dbb]
  (let [ch (chan)
        markers (L/MarkerClusterGroup.)]
    (set! layers (conj layers markers))
    (go (while (not= stop "stop")
          (let [a (<! ch)]
            (macros/rpc
             (get-marker a dbb) [p]
             (let [[[lat lng] img title] p

      (addmarkers db0)))

(defn setdb []
  (let [db (dom/by-id "db")
        mx (dom/by-id "max")
        yo (dom/by-id "go")
        sp (dom/by-id "stop")]
    (set! (.-onclick yo)
          #(do (set! stop "go")
               (when (not (empty? layers)) (removelastlayer))
