From cee5cf23459e9aee21095ab0ceb4b33cc5d2792c Mon Sep 17 00:00:00 2001 From: Benjamin Webb <40066515+webb-ben@users.noreply.github.com> Date: Thu, 15 Aug 2024 10:52:09 -0400 Subject: [PATCH] Add C3 plotting to EDR HTML view --- pygeoapi/static/css/default.css | 9 + pygeoapi/templates/collections/edr/query.html | 260 ++++++++++++++++-- 2 files changed, 245 insertions(+), 24 deletions(-) diff --git a/pygeoapi/static/css/default.css b/pygeoapi/static/css/default.css index 2f87fc9e3..a8bed5164 100644 --- a/pygeoapi/static/css/default.css +++ b/pygeoapi/static/css/default.css @@ -27,6 +27,15 @@ main { height: 400px; } +#coverages-map { + width: 100%; + height: 80vh; +} + +.c3-tooltip-container { + z-index: 300; +} + /* cancel mini-css header>button uppercase */ header button, header [type="button"], header .button, header [role="button"] { text-transform: none; diff --git a/pygeoapi/templates/collections/edr/query.html b/pygeoapi/templates/collections/edr/query.html index 7563273f3..2f25826ac 100644 --- a/pygeoapi/templates/collections/edr/query.html +++ b/pygeoapi/templates/collections/edr/query.html @@ -15,6 +15,9 @@ {% if data.type == "Coverage" or data.type == "CoverageCollection" %} + + + @@ -27,42 +30,253 @@ {% block body %}
-
+ {% if data.features or data.coverages %} +
+ {% else %} +
+

{% trans %}No items{% endtrans %}

+
+ {% endif %}
{% endblock %} {% block extrafoot %} {% if data %}