jjimenezshaw / Leaflet.Control.Layers.Tree

a Tree Layers Control for Leaflet
https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/basic.html
BSD 3-Clause "New" or "Revised" License
146 stars 36 forks source link

Rendering problem #27

Closed katagen closed 4 years ago

katagen commented 4 years ago

Hi, When I try your exemple, it seems that there is a problem with the rendering... Capture d’écran 2020-06-15 à 23 47 12

I have the same problem if I try on my data...

Any idee?

jjimenezshaw commented 4 years ago

Have you linked L.Control.Layers.Tree.css in the html?

Something like <link rel="stylesheet" href="../L.Control.Layers.Tree.css">

katagen commented 4 years ago

Hi, I think so... If I use your exemple named "basic.html", I have this:

basic.zip

The structure is like that: image As you can see, the HTML file is at the same place as the JS and CSS files. But the result is wrong: Sans titre

jjimenezshaw commented 4 years ago

remove crossorigin=""

There is an error in the console:

Access to CSS stylesheet at 'file:///home/.../L.Control.Layers.Tree.css' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

katagen commented 4 years ago

Super, it works now... Thank you!