Skip to content

Commit

Permalink
maps: Don't include JS if no geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
odscjames committed Nov 10, 2022
1 parent ec2431d commit d665805
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit d665805

Please sign in to comment.