                   "Polygon" #(vector (parse %))
                   identity)
               
-        value
-        (if repeat-group-name
-          (let [children (get record repeat-group-name)]
-            (js/console.log "CHILDREN" children)
-            (-> children
-                (nth repeat-index)
-                (get (:full-name geofield))))
-          (get record (:full-name geofield)))
+        value (get record (:full-name geofield))
         coords (coordfn value)]
-    (js/console.log "GEOTYPE" geotype)
-    (js/console.log "REPEAT-INDEX" repeat-index)
-    (js/console.log "REPEAT-GROUP-NAME" repeat-group-name)
-    (js/console.log "COORDS" coords)
-    (js/console.log "VALUE" value)
-    (js/console.log "RECORD" record)
     (if (f/osm? geofield)
       (:geom value)
       (when-not (or (nil? coords) (some nil? coords))

     :else :default)))

(defmethod get-as-geom :repeat
  [record {:keys [children] :as field}]
  (map-indexed
   #(get-as-geom record
                 %2
                 :repeat-index %1
                 :repeat-group-name (:full-name field))
   children))

(defmethod get-as-geom :default
  [record geofield & {:keys [repeat-index repeat-group-name]}]
  (let [geotype ({"geopoint" "Point"
                  "gps" "Point"
                  "geoshape" "Polygon"

             (if (map? geom-or-geoms)
               (make-feature geom-or-geoms (record _id) idx)
               (map #(make-feature % (record _id) idx)
                    (flatten geom-or-geoms))))]
       {:type "FeatureCollection"
        :features (flatten features)}))))

