cljsjs

2017-08-05T15:40:33.648683Z

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"?

juhoteperi 2017-08-05T15:43:42.666636Z

Hmh, I made a typo there...

2017-08-05T15:47:38.688896Z

Thanks! Trying πŸ™‚

2017-08-05T15:53:05.720353Z

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)

juhoteperi 2017-08-05T15:54:09.726241Z

That's probably due to cljsjs/leaflet typo, I think I already fixed that one...

juhoteperi 2017-08-05T15:54:26.727812Z

I should really add proper validation to Cljsjs packaging scripts...

2017-08-05T15:55:19.732686Z

No big deal, I am happy with the previous version tbh. Is there a way I can fix it?

juhoteperi 2017-08-05T15:55:54.736323Z

Leaflet 1.1.0-1 should fix this

juhoteperi 2017-08-05T15:56:10.737785Z

Oh right, react-leaflet depends on 1.1.0-0

2017-08-05T15:56:17.738380Z

Ah makes sense πŸ™‚

πŸ™‚ 1
2017-08-05T16:08:32.811885Z

Works fine now πŸ™‚ (looks like I have some updates to make on my code though - the marker is not displaying anymore)

2017-08-05T16:39:09.987849Z

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

juhoteperi 2017-08-05T16:41:56.003827Z

Do you have this (set! leaflet/Icon.Default.imagePath "//cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/images") somewhere?

juhoteperi 2017-08-05T16:42:10.005086Z

Works for me

2017-08-05T17:05:09.134691Z

I don't, looks like I need the equivalent of that for ReactLeaflet

juhoteperi 2017-08-05T17:17:01.202518Z

Hmh, should work with react-leaflet also

juhoteperi 2017-08-05T17:18:05.208394Z

Hmm, I'm not using that snippet in another project but icons work there

juhoteperi 2017-08-05T17:18:12.208920Z

And that is with react-leaflet

juhoteperi 2017-08-05T17:18:31.210568Z

Hmm or perhaps that project only uses custom icons

2017-08-05T17:19:07.213690Z

I am looking into custom icons now as well

2017-08-05T17:30:42.273976Z

Stupid check, but your leaflet in the snippet above is :require [cljsjs.leaflet :as leaflet] right?

2017-08-05T17:31:20.277379Z

(looks like ReactLeaflet has no Icon so I have to make one from leaflet directly)

juhoteperi 2017-08-05T17:31:54.280492Z

You can't use cljsjs.leaflet :as leaflet

juhoteperi 2017-08-05T17:32:27.283221Z

You either need to use js/L.Icon.Default.imagePath, or migrate to use :global-exports

juhoteperi 2017-08-05T17:32:40.284347Z

:require [leaflet :as leaflet] works

2017-08-05T17:34:23.294143Z

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

juhoteperi 2017-08-05T17:35:15.298412Z

You need Cljs 1.9.854 for :global-exports

juhoteperi 2017-08-05T17:35:25.299229Z

https://clojurescript.org/news/2017-07-30-global-exports

2017-08-05T17:35:42.300733Z

Thanks - I know there has been quite a few nice changes lately πŸ™‚

2017-08-05T17:36:21.304069Z

re - require: https://github.com/cljsjs/packages/tree/master/leaflet this seems to suggest to use :require [cljsjs.leaflet :as leaflet]?

juhoteperi 2017-08-05T17:37:01.307532Z

It doesn't suggest to use :as leaflet with the old name

2017-08-05T17:37:09.308247Z

right

juhoteperi 2017-08-05T17:37:15.308831Z

Proper documentation for this is still missing

2017-08-05T17:37:34.310487Z

no problem at all πŸ™‚

juhoteperi 2017-08-05T17:38:08.313661Z

I updated the web page to mention this a few days ago

2017-08-05T17:38:57.318014Z

very nice πŸ™‚ I have to play a bit with it. Appreciate your help πŸ™‚