jieter/leaflet-headless

How to include leaflet.css?

chriscdn opened this issue · 2 comments

Is there a way to apply the leaflet.css stylesheet? I'm trying to render some circle markers, which require the CSS to position correctly. I tried div.style.cssText = ... but that had no effect.

If you are planning to capture images from a map containing css-styled elements, did you see the note in the leaflet-image readme:

This library does not rasterize HTML because browsers cannot rasterize HTML. Therefore, L.divIcon and other HTML-based features of a map, like zoom controls or legends, are not included in the output, because they are HTML.

So I think adding the css won't do anything useful...

I noticed this soon afterwards and didn't make the connection. Thanks for your feedback.