This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-05
Channels
- # bangalore-clj (1)
- # beginners (99)
- # boot (108)
- # cider (15)
- # clara (4)
- # cljs-dev (12)
- # cljsjs (37)
- # cljsrn (4)
- # clojure (110)
- # clojure-italy (2)
- # clojure-spec (12)
- # clojurescript (168)
- # cursive (1)
- # datomic (24)
- # graphql (6)
- # hoplon (5)
- # jobs-discuss (2)
- # keechma (21)
- # mount (5)
- # off-topic (140)
- # om (2)
- # parinfer (37)
- # planck (6)
- # re-frame (4)
- # reagent (9)
- # rum (2)
- # spacemacs (4)
After upgrading react-leaflet
I get the following message:
No such namespace: cljsjs.react-leaflet
Is there anything needed between "0.12.3-4" and "1.4.1-0"?Hmh, I made a typo there...
For some reason there is a leafnet
error?
java.io.FileNotFoundException: …project/cljsjs/leafnet/development/leaflet.inc.js (No such file or directory)
clojure.lang.ExceptionInfo: …project/cljsjs/leafnet/development/leaflet.inc.js (No such file or directory)
That's probably due to cljsjs/leaflet typo, I think I already fixed that one...
I should really add proper validation to Cljsjs packaging scripts...
Leaflet 1.1.0-1 should fix this
Oh right, react-leaflet depends on 1.1.0-0
Works fine now 🙂 (looks like I have some updates to make on my code though - the marker is not displaying anymore)
probably not your doing, it looks like the request to get the image does not go to cloudflare cdn anymore, it tries to hit my local machine instead (after updating the leaflet css link). I will stay on the version I have for now
Do you have this (set! leaflet/Icon.Default.imagePath "//cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/images")
somewhere?
Works for me
Hmh, should work with react-leaflet also
Hmm, I'm not using that snippet in another project but icons work there
And that is with react-leaflet
Hmm or perhaps that project only uses custom icons
Stupid check, but your leaflet
in the snippet above is :require [cljsjs.leaflet :as leaflet]
right?
You can't use cljsjs.leaflet :as leaflet
You either need to use js/L.Icon.Default.imagePath
, or migrate to use :global-exports
:require [leaflet :as leaflet]
works
Hm if I do :require [leaflet :as leaflet]
I get leaflet is not defined
. I have to read up on :global-export
.
I tried (set! js/L.Icon.Default.imagePath "//cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/images")
- no luck
You need Cljs 1.9.854 for :global-exports
re - require: https://github.com/cljsjs/packages/tree/master/leaflet this seems to suggest to use :require [cljsjs.leaflet :as leaflet]
?
It doesn't suggest to use :as leaflet
with the old name
Proper documentation for this is still missing
I updated the web page to mention this a few days ago