@@ -32,6 +32,18 @@ <h1 class="my-4">
32
32
{% if response.description %}
33
33
< p > {{ response.description }}</ p >
34
34
{% endif %}
35
+ {% if response.license %}
36
+ < div class ="d-flex align-items-center mb-2 ">
37
+ {% include "icons/license.html" %}
38
+ < p class ="mb-0 pl-2 "> {{ response.license }}</ p >
39
+ </ div >
40
+ {% endif %}
41
+ {% if response.extent and response.extent.temporal %}
42
+ < div class ="d-flex align-items-center mb-4 ">
43
+ {% include "icons/clock.html" %}
44
+ < p class ="mb-0 pl-2 "> {{ response.extent.temporal.interval.0.0 or "..." }} — {{ response.extent.temporal.interval.0.1 or "..." }}</ p >
45
+ </ div >
46
+ {% endif %}
35
47
{% if "keywords" in response and response.keywords|length > 0 %}
36
48
< div class ="d-flex align-items-center mb-4 ">
37
49
{% include "icons/tag.html" %}
@@ -43,6 +55,52 @@ <h1 class="my-4">
43
55
</ div >
44
56
{% endif %}
45
57
58
+ {% if response.item_assets and response.item_assets.items()|length > 0 %}
59
+ < h2 > Item Assets</ h2 >
60
+ < ul class ="list-unstyled ">
61
+ {% for key, asset in response.item_assets.items() %}
62
+ < li class ="mb-2 ">
63
+ < p class ="small text-monospace text-muted mb-0 "> {{ key }}</ p >
64
+ < p class ="mb-0 "> < b > {{ asset.title }}</ b > </ p >
65
+ < p class ="mb-0 "> {{ asset.type }}</ p >
66
+ {% if asset.roles|length > 0 %}
67
+ < ul class ="list-inline ">
68
+ {% for role in asset.roles %}
69
+ < li class ="list-inline-item badge badge-light "> {{ role }}</ li >
70
+ {% endfor %}
71
+ </ ul >
72
+ {% endif %}
73
+ </ li >
74
+ {% endfor %}
75
+ </ ul >
76
+ {% endif %}
77
+
78
+ {% if response.renders and response.renders.items()|length > 0 %}
79
+ < h2 > Render Options</ h2 >
80
+ < ul class ="list-unstyled ">
81
+ {% for key, option in response.renders.items() %}
82
+ < li class ="mb-2 ">
83
+ < p class ="small text-monospace text-muted mb-0 "> {{ key }}</ p >
84
+ {% if option.title %}< p class ="mb-0 "> < b > {{ option.title }}</ b > </ p > {% endif %}
85
+
86
+ < div class ="row ">
87
+ < div class ="col-3 "> assets</ div >
88
+ < div class ="col-9 "> {% for asset in option.assets %}{{ asset }}{% if not loop.last %}, {% endif%}{% endfor %}</ div >
89
+ </ div >
90
+
91
+ {% for render_key, render_opt in option.items() %}
92
+ {% if render_key != 'title' and render_key != 'assets' %}
93
+ < div class ="row ">
94
+ < div class ="col-3 "> {{ render_key }}</ div >
95
+ < div class ="col-9 "> {{ render_opt }}</ div >
96
+ </ div >
97
+ {% endif %}
98
+ {% endfor %}
99
+ </ li >
100
+ {% endfor %}
101
+ </ ul >
102
+ {% endif %}
103
+
46
104
< h2 > Links</ h2 >
47
105
< ul >
48
106
{% for link in response.links %}
@@ -51,18 +109,6 @@ <h2>Links</h2>
51
109
</ ul >
52
110
</ div >
53
111
< div class ="col-md-5 ">
54
- {% if response.license %}
55
- < div class ="d-flex align-items-center mb-2 ">
56
- {% include "icons/license.html" %}
57
- < p class ="mb-0 pl-2 "> {{ response.license }}</ p >
58
- </ div >
59
- {% endif %}
60
- {% if response.extent and response.extent.temporal %}
61
- < div class ="d-flex align-items-center mb-2 ">
62
- {% include "icons/clock.html" %}
63
- < p class ="mb-0 pl-2 "> {{ response.extent.temporal.interval.0.0 or "..." }} — {{ response.extent.temporal.interval.0.1 or "..." }}</ p >
64
- </ div >
65
- {% endif %}
66
112
{% if response.extent and response.extent.spatial %}
67
113
< div id ="map " class ="rounded " style ="width: 100%; height: 400px ">
68
114
Loading...
@@ -89,7 +135,7 @@ <h2>Links</h2>
89
135
content : '<i class="fa fa-expand"></i>' // You can customize this icon
90
136
}
91
137
} ) . setView ( [ 0 , 0 ] , 1 ) ;
92
-
138
+
93
139
var osmLayer = new L . TileLayer (
94
140
'https://tile.openstreetmap.org/{z}/{x}/{y}.png' , {
95
141
maxZoom : 18 ,
@@ -122,12 +168,12 @@ <h2>Links</h2>
122
168
map . fitBounds ( bbox_polygon . getBounds ( ) ) ;
123
169
}
124
170
}
125
-
171
+
126
172
// Add any tilejson links as layers to the map
127
173
const tileJsonLinks = collection . links . filter ( link => link . rel === "tiles" ) ;
128
-
174
+
129
175
const overlayLayers = { } ;
130
-
176
+
131
177
if ( tileJsonLinks . length > 0 ) {
132
178
tileJsonLinks . forEach ( ( link , index ) => {
133
179
fetch ( link . href )
@@ -139,22 +185,22 @@ <h2>Links</h2>
139
185
minZoom : tileJson . minzoom || 0 ,
140
186
maxZoom : tileJson . maxzoom || 18
141
187
} ) ;
142
-
188
+
143
189
const layerName = link . title || `TileJSON Layer ${ index + 1 } ` ;
144
190
overlayLayers [ layerName ] = tileLayer ;
145
-
191
+
146
192
// Add the first layer to the map by default
147
193
if ( index === 0 ) {
148
194
tileLayer . addTo ( map ) ;
149
195
}
150
-
196
+
151
197
// Add layer control after all layers are processed
152
198
if ( index === tileJsonLinks . length - 1 ) {
153
199
// Define the base layers
154
200
const baseLayers = {
155
201
"OpenStreetMap" : osmLayer
156
202
} ;
157
-
203
+
158
204
// Add the layer control to the map
159
205
L . control . layers ( baseLayers , overlayLayers ) . addTo ( map ) ;
160
206
}
@@ -164,7 +210,7 @@ <h2>Links</h2>
164
210
} ) ;
165
211
} ) ;
166
212
}
167
-
213
+
168
214
// Handle fullscreen change event to resize map
169
215
map . on ( 'fullscreenchange' , function ( ) {
170
216
if ( map . isFullscreen ( ) ) {
0 commit comments