diff --git a/pygeoapi/api.py b/pygeoapi/api.py
index 6906bbd..9f21c3a 100644
--- a/pygeoapi/api.py
+++ b/pygeoapi/api.py
@@ -433,7 +433,7 @@ class API(object):
self.config['server']['url'], dataset, next_)
}, {
'type': 'application/json',
- 'title': 'Collection',
+ 'title': self.config['datasets'][dataset]['title'],
'rel': 'collection',
'href': '{}/collections/{}'.format(
self.config['server']['url'], dataset)
@@ -525,8 +525,19 @@ class API(object):
}, {
'rel': 'collection',
'type': 'application/json',
+ 'title': self.config['datasets'][dataset]['title'],
'href': '{}/collections/{}'.format(
self.config['server']['url'], dataset)
+ }, {
+ 'rel': 'prev',
+ 'type': 'application/json',
+ 'href': '{}/collections/{}/items/{}'.format(
+ self.config['server']['url'], dataset, identifier ) #todo: getPrevious
+ }, {
+ 'rel': 'next',
+ 'type': 'application/json',
+ 'href': '{}/collections/{}/items/{}'.format(
+ self.config['server']['url'], dataset, identifier ) #todo: getNext
}
]
diff --git a/pygeoapi/static/css/default.css b/pygeoapi/static/css/default.css
index b521b82..7286aeb 100644
--- a/pygeoapi/static/css/default.css
+++ b/pygeoapi/static/css/default.css
@@ -6,4 +6,19 @@ header {
}
main {
background-color:white
-}
\ No newline at end of file
+}
+
+.crumbs {
+ background-color:rgb(230, 230, 230);
+ padding: 6px;
+}
+.crumbs a {
+ padding-left:10px;
+ color:black;
+ text-transform: capitalize;
+}
+
+#items-map {
+ width: 100%;
+ height: 400px;
+ }
\ No newline at end of file
diff --git a/pygeoapi/templates/base.html b/pygeoapi/templates/base.html
index e085aa7..6f2ab68 100644
--- a/pygeoapi/templates/base.html
+++ b/pygeoapi/templates/base.html
@@ -20,24 +20,35 @@
-
+
+
+
+ {% block crumbs %}
+
Home
+ {% endblock %}
+
+ JSON
+
+
+
-
-
- {% block body %}
- {% endblock %}
+
+
+
+ {% block body %}
+ {% endblock %}
+
+
+ {% for link in data['links'] %}
+ {% if link['rel'] == 'prev' %}
+
Prev
+ {% elif link['rel'] == 'next' %}
+
Next
+ {% endif %}
+ {% endfor %}
+
+
{% endblock %}
diff --git a/pygeoapi/templates/items.html b/pygeoapi/templates/items.html
index 2c53eba..6257cd5 100644
--- a/pygeoapi/templates/items.html
+++ b/pygeoapi/templates/items.html
@@ -1,32 +1,63 @@
{% extends "base.html" %}
{% block title %}{{ super() }} {{ data['title'] }} {% endblock %}
+{% block crumbs %}{{ super() }}
+
Collections
+{% for link in data['links'] %}
+ {% if link.rel == 'collection' %}
+
{{ link['title'] }}
+ {% endif %}
+{% endfor %}
+
Items
+{% endblock %}
{% block extrahead %}
-
{% endblock %}
{% block body %}
- {{ data['title'] }}
- {{ data['description'] }}
- Features 
- {% for link in data['links'] %}
- {% if link['rel'] == 'prev' %}
- Prev
- {% elif link['rel'] == 'next' %}
- Next
- {% endif %}
- {% endfor %}
-
+
+
Items
+
+
+
+
+
+
+
+ | ID |
+ {% for k, v in data['features'][0]['properties'].items() %}
+ {{ k }}
+ {% endfor %}
+ |
+
+
+ {% for ft in data['features'] %}
+
+ | {{ ft.ID }} |
+ {% for k, v in ft['properties'].items() %}
+ {{ v }} |
+ {% endfor %}
+
+ {% endfor %}
+
+
+
+
+
+
+
+ {% for link in data['links'] %}
+ {% if link['rel'] == 'prev' %}
+
Prev
+ {% elif link['rel'] == 'next' %}
+
Next
+ {% endif %}
+ {% endfor %}
+
+
{% endblock %}
@@ -42,7 +73,7 @@
var geojson_data = {{ data['features'] |to_json }};
var items = new L.GeoJSON(geojson_data, {
onEachFeature: function (feature, layer) {
- var html_ = '
' + feature.ID + '';
+ var html_ = '
' + feature.ID + '';
layer.bindPopup(html_);
}
});
diff --git a/pygeoapi/templates/root.html b/pygeoapi/templates/root.html
index 74d8498..e6c440c 100644
--- a/pygeoapi/templates/root.html
+++ b/pygeoapi/templates/root.html
@@ -11,10 +11,12 @@