Closed Matbj closed 7 years ago
Same problem here, it's not django-leaflet's bug. It comes from Leaflet.
For fixing it's enough replacing at line
return path.indexOf('url') === 0 ?
path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '') : '';
for this new one:
return path.indexOf('url') === 0 ?
path.replace(/^url\([\"\']?/, '').replace(/marker-icon[\.[a-zA-Z0-9]*\.png[\"\']?\)$/, '') : '';
I'm very newbie with GIS, but I've done tests with my map with and without Whitenoise and it worked in both cases.
Merged in #197
@xusy2k I just deployed my application using heroku when i noticed this error, but i cant find the leaflet file you said we should edit in my folders. I am using django-leaflet and geodjango for my application. Please, i will appreciate if you have a way of going through this.
Hi @olawale1rty! The files you are looking for are located at this commit xusy2k/django-leaflet@4fbf80d06c288727ed1e990e951499220d515a3f, but right now they are merged into master.
Maybe you can keep an eye to #268 and its files, makinacorpus/django-leaflet@a90098d7dcdbbcdfed329300d568c9691da21860
Thank you very much sir.
On Sunday, May 31, 2020, Xus Zoyo notifications@github.com wrote:
Hi @olawale1rty https://github.com/olawale1rty! The files you are looking for are located at this commit xusy2k/django-leaflet@4fbf80d https://github.com/xusy2k/django-leaflet/commit/4fbf80d06c288727ed1e990e951499220d515a3f, but right now they are merged into master.
Maybe you can keep an eye to #268 https://github.com/makinacorpus/django-leaflet/pull/268 and its files, a90098d https://github.com/makinacorpus/django-leaflet/commit/a90098d7dcdbbcdfed329300d568c9691da21860
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/makinacorpus/django-leaflet/issues/188#issuecomment-636440972, or unsubscribe https://github.com/notifications/unsubscribe-auth/AML2Z3BAPSBLTFPMJ6KNEILRUIKADANCNFSM4DJXOK5Q .
No solutions for this issue?
No solutions for this issue?
@faprietoml You need to build leaflet from source yourself. See commits in: https://github.com/faaizajaz/django-leaflet
No solutions for this issue?
@faprietoml You need to build leaflet from source yourself. See commits in: https://github.com/faaizajaz/django-leaflet
Thank you
@faaizajaz can we see a diff of your patch on the non-minified leaflet source?
@faaizajaz can we see a diff of your patch on the non-minified leaflet source?
I based my patch on this PR: https://github.com/makinacorpus/django-leaflet/commit/a90098d7dcdbbcdfed329300d568c9691da21860
Unfortunately this needs to be done manually every time there is a new leaflet release (unless they have fixed it in the last month or so).
OK, then I think we could store the patch to ...-src.js
somewhere in django-leaflet source tree, then add a README.upgrade
in leaflet/static/leaflet/ to document it (and a command to produce a minified version from the patched file). Then ideally a regression test should be added too, if possible.
I'm using Whitenoise for static file serving (because reasons) and I think that the regex that is being used here: .../staticfiles/leaflet/leaflet-src.js:6325
path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '') : '';
messes up when used with Whotenoise because it tries to fetch the file like this: