         lat-range (- (last lats) (first lats) ) ]
     [(+ (first lngs) (rand lng-range)) (+ (first lats) (rand lat-range))] ))
 
-(defn generate-random-point! [n]
-  (println "Generating random point" n)
-  (add-point! {:coordinates (random-coords-in-view main-map)
-               :type "Point"} ))
+(defn generate-random-point []
+  {:coordinates (random-coords-in-view main-map) :type "Point"})
+
+(defn generate-random-points [n]
+  (repeatedly n #(generate-random-point)))
 
 (defn on-js-reload []
   ;; optionally touch your app-state to force rerendering depending on
   ;; your application
-  (swap! app-state update-in [:__figwheel_counter] inc)
-)
+  (swap! app-state update-in [:__figwheel_counter] inc))
 
 ;; Button to generate 10 random points on the map
 (defn add-points-btn [num-points]

   [:br]
   [:input {:type "button"
            :value "Add points to Map"
            :on-click #(dotimes [n num-points] (generate-random-point! n))}] ])

(defn render-page []
  (r/render-component
   [add-points-btn 10]
   (.getElementById js/document "app"))
  (setup-map! main-map))

(render-page)

   :color "#000"
   :weight 1
   :opacity 1
   :fillOpacity 0.6} )

(defn point-to-layer [feature, latlng]  ;; http://leafletjs.com/examples/geojson.html
  (.circleMarker js/L latlng (clj->js gj-marker-settings)))
