This commit is contained in:
Simon Brooke 2018-07-22 17:49:38 +01:00
parent ea89e37d77
commit 90a8dd5d6a

View file

@ -81,6 +81,12 @@
:maxZoom 18}))
view)
(dispatch-sync [:set-view view])
(.on view "moveend"
(fn [_] (let [c (.getCenter view)]
(js/console.log (str "Moving centre to " c))
(dispatch :set-latitude (.-lat c))
(dispatch :set-longitude (.-lon c))
(dispatch :fetch-locality))))
(refresh-map-pins)
view))