Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.96k stars 992 forks source link

Leaflet.Draw default images path #752

Open mad4hit opened 7 years ago

mad4hit commented 7 years ago

How to reproduce

I wonder if is possible to set the default path for imagese like leaflet do. ex:L.Icon.Default.imagePath = '../content/images/leaflet/'

I need to move the svg spritesheet.svg in a folder named content/images/leaflet but i can't. i need to create the path 'content/leaflet-draw/dist/images/spritesheet.svg '.

Thanks for help!

jbccollins commented 7 years ago

I had a similar issue with my setup. Using relative urls in the css of npm packages causes issues when you try and dump all your css into one big dist.css file. To be fair this isn't really a leaflet-draw problem. My fix was to write my own postcss plugin https://github.com/jbccollins/postcss-twist-url-assets If your setup is similar maybe that will work for you too. Idk. Good luck.