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

maps: Don't include JS if no geometry #40

Merged
1 commit merged into from
Nov 10, 2022
Merged
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: 2 additions & 2 deletions cove_ofds/templates/cove_ofds/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ <h4 class="panel-title">

{% block extrafooterscript %}
{{ block.super }}
{% if can_download_geojson %}
{% if can_download_geojson %}{% if any_nodes_with_geometry or any_spans_with_geometry %}
<script>
var map = L.map('map').setView([9.072973, 7.481621], 6);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
Expand Down Expand Up @@ -351,7 +351,7 @@ <h4 class="panel-title">
var geoJsonFiles = ['{{download_geojson_spans_url}}', '{{download_geojson_nodes_url}}']
geoJsonFiles.forEach(geoJsonFile => getGeoJSON(geoJsonFile))
</script>
{% endif %}
{% endif %}{% endif %}
{% endblock %}


Expand Down