Fork me on GitHub
#fulcro
<
2022-04-19
>
aratare10:04:07

Hi @tony.kay, it seems like https://book.fulcrologic.com/ is returning nginx welcome message at the moment. Is this happening to you as well?

đź‘Ť 1
janezj11:04:09

Hi, I have an app build around https://book.fulcrologic.com/#HOCGoogleMaps to edit polygons. I don't know how to get access to map instance, to retrieve changed polygon (https://developers.google.com/maps/documentation/javascript/reference/map#Map.data). I tried to find map instance in injected-props.

roklenarcic12:04:14

You’ll probably need to capture an instance of maps into a react ref

roklenarcic12:04:17

(defsc ImageUpload [this props {:keys [on-scan]}]
  {:ident (fn [] [:component/id ::ImageUpload])
   :query []
   :initial-state {}
   :route-segment ["image"]}
  (let [ref (react/createRef)]
    (comp/fragment
      (ui-button {:icon true :labelPosition "left"
                  :onClick (fn [] (.openImageDialog (.-current ref)))}
        (ui-icon {:name "upload"})
        "Select Image"))))

janezj12:04:50

Thanks! It works