This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-27
Channels
- # bangalore-clj (2)
- # beginners (41)
- # cider (14)
- # cljs-dev (12)
- # cljsrn (2)
- # clojure (106)
- # clojure-austin (6)
- # clojure-dev (22)
- # clojure-dusseldorf (1)
- # clojure-france (1)
- # clojure-greece (17)
- # clojure-italy (6)
- # clojure-poland (3)
- # clojure-russia (10)
- # clojure-serbia (5)
- # clojure-spec (24)
- # clojure-uk (100)
- # clojurescript (126)
- # cursive (3)
- # data-science (5)
- # datascript (15)
- # datomic (3)
- # defnpodcast (2)
- # dirac (6)
- # emacs (10)
- # fulcro (121)
- # graphql (30)
- # hoplon (7)
- # jobs (2)
- # leiningen (20)
- # off-topic (14)
- # onyx (3)
- # other-languages (13)
- # pedestal (1)
- # perun (2)
- # planck (41)
- # re-frame (16)
- # reagent (6)
- # reitit (5)
- # remote-jobs (3)
- # ring (1)
- # ring-swagger (17)
- # shadow-cljs (137)
- # spacemacs (6)
- # sql (4)
- # uncomplicate (7)
- # unrepl (56)
- # vim (27)
Good morrow
Bah-humbug
That's better, first dose of caffeine down the hatch
mronngi
Speaking of Christmas, we decorated our tree over the weekend. Feels a little early, but it's really pretty 🎄
Hi @yogidevbear, I saw the other day that you posted about a functional programmers group in Horsham. I'm in Horsham and would be happy to help. Are you planning a meeting or get together soon?
Hi Matt 🙂 I was actually thinking of reaching out to you anyway. Jon mentioned that you were in Horsham before. I definitely want to get something arranged. Even if it's just an afternoon coffee somewhere like Stookes with anyone on the group that is interested or a meetup at a pub like The Black Jug.
I think it would be awesome to get an experienced Clojure dev to share some of their insights with the group
Sounds really good, shall we meet up sometime this week and put some thoughts together? I have an idea for a venue as well but would need to check with them first.
Sounds good
@yogidevbear <<Speaking of Christmas, we decorated our tree over the weekend.>> ………… hmmmmmm 😕
What? A little too early?
The general law is you can play Christmas Wrapping by The Waitresses on any of the 365 days of the year, other than that the rest is totally off limits. 🙂
Traditionally I think it's meant to be something like 10 days for and 10 days after, can't really remember
Secretly wants to open the PS4Pro present that Santa dropped off a month early and start playing
@yogidevbear hmmm.... that is NOT a secret... that is actually a well known fact 😉
hahaha
Last time I owned a "decent" gaming console was a PS1 in 19.... (voice trails off to hide my age)
That must have been around the mid 90s?
Yeeees... You "son" 😉
Prior to that PS1 it was a SEGA genisis (/ mega drive)
@yogidevbear I'm doing the same with my psvr.
What it is to be a child again 👦
@yogidevbear of course.... 😉
@thomas is "he" getting the Xbox One X?
Tough decision
Every time I see the One X ad come on the TV I become very... what's a word for jealous, but not jealous
Can't explain why, but the Xbox series appeals to me more
Guess there's always next Christmas
(And slowly but surely my wife loses her husband and son into the land of gaming)
:thinking_face:
We only just finished Thanksgiving so I won't want to see another turkey until Easter!
Our crowd of friends here is mostly pagan so Yule/Winter Solstice is our next celebration, rather than Christmas proper.
Hello everyone… Has anyone in here added custom markers to LeafletJS maps under ClojureScript..?
@U08ABGP70 What have you managed? What have you tried?
I have switched over to markers and the code I have throw no errors, but equally, none of the markers on the map are anything but the default ones…
So, the data / node that the case is using exists, and even if it didn’t I would expect to get all green, custom markers. But I get standard markers. It’s as if the attempt to add custom stuffs is simply being ignored.
This is from the LeafletJS docs:
var greenIcon = L.icon({
iconUrl: 'leaf-green.png',
shadowUrl: 'leaf-shadow.png',
iconSize: [38, 95], // size of the icon
shadowSize: [50, 64], // size of the shadow
iconAnchor: [22, 94], // point of the icon which will correspond to marker's location
shadowAnchor: [4, 62], // the same for the shadow
popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
});
There are JS instructions to reduce code repetition after that in the LeafletJS docs, but when I started there I got all kinds of errors about “X is not a function” so I pared it back to the simplest possible implementation, and that’s where I am now… I have got LeafletJS default markers, and no errors, but the custom markers stuff seems to simply be being ignored.
I have spent a couple of hours trying to get it to work, by trying to transpose the JavaScript instructions into ClojureScript, basically to no avail… I am pretty sure that I am simply not aware of how to properly “speak” ClojureScript for this kind of thing, where in Javascript you “var greenmarker = L.icon …” but that does not translate non-opaquely into CLJS (for me at this point, I am sure that it will as / when I get better at this)
Generally speaking, when you interop you need to create a javascript map by using #js
https://gist.github.com/maleghast/386abf921d54840f06682e27d81223e5#file-markers-cljs-L10
I'm also not sure what you're trying to achieve with:
(-> (some-js-object)
{:cljs :map }
But it looks wrongOK, I am not sure what you mean about any of this… I will go and look at the bit of the Gist you highlighted first…
Ah, ok… I’ve tried wrapping the result of the (case …) in a call to (clj->js …) but that gets me an error about the iconUrl not being set in the options. Also the “(->” part you are referring to came from assistance from mccraigmccraig - it works, it places the markers on the map as expected, they just aren’t the custom markers that I wanted. That bit was previously placing circles on the map.
Looking at the LeafletJS docs, I think it should be:
(-> (L.Marker (array 1 2) #js {:marker opts})
(.addTo mapinst)
(.bindPopup (:name marker)))
I’ve updated the Gist to what you suggested, and my code. The up-side is still no errors. The down-side is that it doesn’t do the custom markers 😞
AMAZING! Thanks so much - it was just a case of me not speaking ClojureScript properly
I can just put JSON Arrays that I’ve turned into Vectors straight into JS calls, though yeah? Or should I #js them as well?