Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
913beffb61
5 changed files with 17 additions and 13 deletions
|
|
@ -23,6 +23,9 @@
|
|||
;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;;; Specified here:
|
||||
;;;; https://github.com/simon-brooke/youyesyet/blob/master/doc/specification/scaling.md#searching-the-database-for-localities
|
||||
|
||||
;;;; See also resources/sql/locality-trigger.sql
|
||||
|
||||
(defn locality
|
||||
|
|
@ -36,6 +39,7 @@
|
|||
(int ;; we're interested in localities West of Greenwich.
|
||||
(* longitude 100)))))
|
||||
|
||||
|
||||
(defn neighbouring-localities
|
||||
"Return this locality with the localities immediately
|
||||
north east, north, north west, east, west, south west,
|
||||
|
|
@ -53,4 +57,4 @@
|
|||
(+ locality 100)
|
||||
(+ locality 101)))
|
||||
|
||||
(neighbouring-localities 5482391)
|
||||
|
||||
|
|
|
|||
|
|
@ -109,22 +109,17 @@
|
|||
(defn map-remove-pins
|
||||
"Remove all pins from this map `view`. Side-effecty; liable to be problematic."
|
||||
[view]
|
||||
(if
|
||||
view
|
||||
(let [layers (.eachLayer view (fn [l] l))]
|
||||
(doall
|
||||
(map
|
||||
#(if
|
||||
(instance? js/L.Marker %)
|
||||
(.removeLayer view %))
|
||||
layers))))
|
||||
(.eachLayer view
|
||||
#(if
|
||||
(instance? js/L.Marker %)
|
||||
(.removeLayer view %)))
|
||||
view)
|
||||
|
||||
|
||||
(defn refresh-map-pins
|
||||
"Refresh the map pins on this map. Side-effecty; liable to be problematic."
|
||||
[]
|
||||
(let [view @(subscribe [:view]) ;; (map-remove-pins @(subscribe [:view]))
|
||||
(let [view (map-remove-pins @(subscribe [:view]))
|
||||
addresses @(subscribe [:addresses])]
|
||||
(if
|
||||
view
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@
|
|||
(fn
|
||||
[dwelling]
|
||||
(ui/big-link
|
||||
(:sub-address dwelling)
|
||||
(:sub_address dwelling)
|
||||
:target (str "#/dwelling/" (:id dwelling))) )
|
||||
(sort-by
|
||||
:sub-address
|
||||
:sub_address
|
||||
(:dwellings address)))]]]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue