Closed zarino closed 4 months ago
FYI @struan I’ve tested this out locally (with DEBUG=False
in my docker env) and it works – and have verified that the URL in the HTML gets passed to Leaflet when it’s making its marker. Whether something on the live site (but not on Docker under DEBUG=False
) will add a hash to the URL remains to be seen.
Note, though, I really think we should be setting this path with – see alternate pull request in https://github.com/mysociety/local-intelligence-hub/pull/588Icon.Default.imagePath = "<whatever>"
in explore.esm.js
but that doesn’t seem to work. Maybe because we’re importing bits of Leaflet individually (eg: import { Icon } from 'leaflet/src/layer/marker'
) and the modification doesn’t carry through separate imported objects? Must admit this is the point I get out my depth with ES6 Modules 😬
Closing in favour of #588.
Including
url("/static/leaflet/images/marker-icon.png")
in our Sass doesn’t work because django-compressor adds a hash as a query parameter, which breaks Leaflet’s/^(.*)marker-icon\.png$/
regexp.So this commit removes the ruleset from our Sass pipeline, and just embeds it directly into the HTML page, where django-compressor can’t mess it up.