Skip to content

Commit

Permalink
add map-layer to map (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvgenuchten committed May 15, 2024
1 parent fd92861 commit c4611b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pygeoapi/templates/collections/collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ <h3>{% trans %}Storage CRS{% endtrans %}</h3>
}
));

{# if this collection has a map representation, add it to the map #}
{% for link in data['links'] %}
{% if link['rel'] == 'http://www.opengis.net/def/rel/ogc/1.0/map' and link['href'] %}
L.tileLayer.wms("{{ link['href'] }}", {"opacity": .7, "transparent": true, "crs": L.CRS.EPSG4326}).addTo(map);
{% endif %}
{% endfor %}


var bbox_layer = L.polygon([
['{{ data['extent']['spatial']['bbox'][0][1] }}', '{{ data['extent']['spatial']['bbox'][0][0] }}'],
['{{ data['extent']['spatial']['bbox'][0][3] }}', '{{ data['extent']['spatial']['bbox'][0][0] }}'],
Expand Down

0 comments on commit c4611b0

Please sign in to comment.