File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 3434 :iconSize [w h]
3535 :iconAnchor [(/ w 2 ) (/ h 2 )]}))))
3636
37+ ; ; Default bounds covering NYC metro area isochrone extent (with padding)
38+ (def default-max-bounds
39+ {:south 39.5 :west -76
40+ :north 42 :east -71.75 })
41+
3742(defn create-map
3843 " Initialize Leaflet map"
3944 [element-id]
4045 (let [Map (.-Map L)
4146 TileLayer (.-TileLayer L)
47+ {:keys [south west north east]} default-max-bounds
4248 map-instance (new Map element-id #js {:center #js [40.7128 -74.0060 ]
4349 :zoom 12
50+ :minZoom 8
4451 :zoomControl true
45- :clickTolerance 10 })]
52+ :clickTolerance 10
53+ :maxBoundsViscosity 1.0
54+ :maxBounds #js [#js [south west]
55+ #js [north east]]})]
4656
4757 ; ; Add tile layer
4858 (.addTo (new TileLayer tile-layer-url
You can’t perform that action at this time.
0 commit comments