New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
django-leaflet with Whitenoise messes up marker-icon.png and marker-shadow.png #188
Comments
Whitenoise append a suffix not contemplated in replace
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. |
Whitenoise append a suffix not contemplated in replace Found at makinacorpus/django-leaflet#188
It contains fix for makinacorpus#188
Merged in #197 |
@xusy2k |
Hi @olawale1rty! |
Thank you very much sir.
…On Sunday, May 31, 2020, Xus Zoyo ***@***.***> wrote:
Hi @olawale1rty <https://github.com/olawale1rty>!
The files you are looking for are located at this commit
***@***.***
<xusy2k@4fbf80d>,
but right now they are merged into master.
Maybe you can keep an eye to #268
<#268> and its files,
a90098d
<a90098d>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AML2Z3BAPSBLTFPMJ6KNEILRUIKADANCNFSM4DJXOK5Q>
.
|
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? |
I based my patch on this PR: a90098d 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 |
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:
The text was updated successfully, but these errors were encountered: