Skip to content

Commit be5ba0d

Browse files
committed
add indicator for presence of xyz tileset
1 parent 338656a commit be5ba0d

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

ohmg/api/schemas.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class MapListSchema2(Schema):
8989
sheet_ct: int
9090
volume_number: Optional[str]
9191
gt_exists: bool
92+
xyz_tiles_exists: bool
9293
featured: bool
9394
hidden: bool
9495
document_ct: int

ohmg/core/models/map.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ def gt_exists(self):
207207
else False
208208
)
209209

210+
@property
211+
def xyz_tiles_exists(self):
212+
return (
213+
True
214+
if self.get_layerset("main-content") and self.get_layerset("main-content").xyz_tiles_url
215+
else False
216+
)
217+
210218
@property
211219
def mj_exists(self):
212220
return (

ohmg/frontend/svelte_components/src/components/tables/Maps.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@
209209
bind:offset
210210
/></th
211211
>
212-
<th><SortableHeader title="GT" alt="A geotiff has been created for this map's main content" /></th>
212+
<th class="new-col"><SortableHeader title="GT" alt="A geotiff has been created for this map's main content" /></th>
213+
<th><SortableHeader title="XYZ" alt="An XYZ tileset has been created for this map's main content" /></th>
213214
</tr>
214215
</thead>
215216
<tbody>
@@ -257,6 +258,13 @@
257258
<span style="color:red">x</span>
258259
{/if}</td
259260
>
261+
<td class="number-col"
262+
>{#if s.xyz_tiles_exists}
263+
<span style="color:green">✓</span>
264+
{:else}
265+
<span style="color:red">x</span>
266+
{/if}</td
267+
>
260268
</tr>
261269
{/each}
262270
</tbody>

0 commit comments

Comments
 (0)