Skip to content
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

Fix Leaflet marker image path discovery #586

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions hub/static/css/_leaflet.scss

This file was deleted.

1 change: 0 additions & 1 deletion hub/static/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

@import "../../../vendor/leaflet/leaflet-1.8.0";

@import "leaflet";
@import "leaflet-geosearch";

@import "site-header";
Expand Down
11 changes: 11 additions & 0 deletions hub/templates/hub/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
{% block script %}
<script type="module" src="{% static 'js/home-out-esm.js' %}"></script>
<script type="module" src="{% static 'js/explore-out-esm.js' %}"></script>
<style type="text/css">
{% comment %}
L.Icon.Default uses this style to work out the path to our images.
We define it here, rather than in our Sass pipeline, to bypass
django-compressor’s URL hashing, which is incompatible with the
regular expression used in Leaflet.Icon.Default._stripUrl.
{% endcomment %}
.leaflet-default-icon-path {
background-image: url("{% static 'leaflet/images/marker-icon.png' %}") !important;
}
</style>
{% endblock %}

{% block content %}
Expand Down
Loading