Skip to content

Commit 55ae06c

Browse files
authored
Merge pull request #222 from OvertureMaps/externalized-versions
Add STAC dependency and improve Inspector Panel UI
2 parents 06fd4e1 + 7c837a1 commit 55ae06c

File tree

15 files changed

+608
-138
lines changed

15 files changed

+608
-138
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
1+
# This workflow will do a clean install of node dependencies and deploy to AWS.
32

43
name: Deploy
54

65
on:
76
push:
8-
branches: [ main , manifest_driven_downloads]
7+
branches: [ main ]
98
pull_request:
109
branches: [ main ]
1110

@@ -37,7 +36,7 @@ jobs:
3736
run: cd site; npm install
3837
- name: Build 🏃
3938
run: cd site; npm run build
40-
env:
39+
env:
4140
BASE_ARIA_URL: ${{ steps.vars.outputs.ariabaseurl }}
4241
- name: Upload artifacts 📤
4342
uses: actions/upload-artifact@v4
@@ -50,6 +49,9 @@ jobs:
5049
name: Deploy
5150
runs-on: ubuntu-latest
5251
needs: build
52+
environment:
53+
name: preview
54+
url: https://d13285jxgcxetl.cloudfront.net/aria/${{ steps.vars.outputs.distdir }}/index.html
5355

5456
steps:
5557
- name: Checkout 📥
@@ -94,4 +96,4 @@ jobs:
9496

9597
- name: Deployment complete! 🚀
9698
run: |
97-
echo "Your build is at: https://d13285jxgcxetl.cloudfront.net/aria/${{ steps.vars.outputs.distdir }}/index.html"
99+
echo "Your build is at: https://d13285jxgcxetl.cloudfront.net/aria/${{ steps.vars.outputs.distdir }}/index.html" >> $GITHUB_STEP_SUMMARY

site/src/DownloadCatalog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// URL for the remote manifest file
2-
const STAC_URL = 'https://labs.overturemaps.org/stac/catalog.json'
2+
const STAC_URL = 'https://stac.overturemaps.org/catalog.json'
33

44
// Cache the manifest to avoid repeated fetches
55
let cachedManifest = null;
@@ -24,7 +24,7 @@ async function fetchManifest() {
2424
})
2525
.then(stacData => {
2626
const latest = stacData.latest;
27-
return fetch(`https://labs.overturemaps.org/stac/${latest}/manifest.geojson`);
27+
return fetch(`https://stac.overturemaps.org/${latest}/manifest.geojson`);
2828
})
2929
.then(response => {
3030
if (!response.ok) {

site/src/Map.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ import { layers } from "./Layers";
2020
import ThemeTypeLayer from "./ThemeTypeLayer";
2121
import FeaturePopup from "./FeatureSelector";
2222

23+
// Fetch the latest Overture release from Overture STAC
24+
const LATEST_RELEASE = await fetch('https://stac.overturemaps.org/catalog.json').then(r => r.json()).then(r => r.latest.split('.')[0])
25+
2326
const PMTILES_URL =
24-
"pmtiles://https://d3c1b7bog2u1nn.cloudfront.net/2025-07-23/";
27+
"pmtiles://https://d3c1b7bog2u1nn.cloudfront.net/" + LATEST_RELEASE + "/";
2528

2629
const INITIAL_VIEW_STATE = {
2730
latitude: 38.90678,

site/src/inspector_panel/InspectorPanel.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
overflow-y: scroll;
3333
overflow-x: auto;
3434
max-height: 250px;
35-
table-layout: fixed;
35+
table-layout: auto;
3636
}
3737

3838
table th {

site/src/inspector_panel/InspectorPanel.jsx

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ function InspectorPanel({
3232

3333
const theme = entity["theme"];
3434

35+
// Determine the panel title - use name if available, otherwise default
36+
let panelTitle = "Inspector Panel";
37+
if (entity["names"]) {
38+
try {
39+
const names = JSON.parse(entity["names"]);
40+
if (names["primary"]) {
41+
panelTitle = names["primary"];
42+
}
43+
} catch (e) {
44+
// If parsing fails, keep default title
45+
}
46+
}
47+
3548
let inspectorPanel = <div></div>;
3649

3750
if (theme === "base") {
@@ -101,14 +114,47 @@ function InspectorPanel({
101114
} else {
102115
console.log("unhandled theme type");
103116
console.log(entity);
117+
118+
// Get all keys except those starting with @
119+
const allKeys = Object.keys(entity).filter((key) => !key.startsWith("@"));
120+
121+
// Create custom ordering for class/subclass hierarchy
122+
const orderedKeys = [];
123+
const processedKeys = new Set();
124+
125+
// First pass: add all keys except subclass
126+
allKeys.forEach(key => {
127+
if (key !== "subclass") {
128+
orderedKeys.push({ key, indented: false });
129+
processedKeys.add(key);
130+
131+
// If this is "class" and "subclass" exists, add subclass right after
132+
if (key === "class" && entity.hasOwnProperty("subclass")) {
133+
orderedKeys.push({ key: "subclass", indented: true });
134+
processedKeys.add("subclass");
135+
}
136+
}
137+
});
138+
139+
// Second pass: add any remaining keys that weren't processed
140+
allKeys.forEach(key => {
141+
if (!processedKeys.has(key)) {
142+
orderedKeys.push({ key, indented: false });
143+
}
144+
});
145+
104146
inspectorPanel = (
105147
<table>
106148
<tbody>
107-
{Object.keys(entity)
108-
.filter((key) => !key.startsWith("@"))
109-
.map((key) => (
110-
<TableRow key={key} mode={mode} table_key={key} entity={entity} />
111-
))}
149+
{orderedKeys.map(({ key, indented }) => (
150+
<TableRow
151+
key={key}
152+
mode={mode}
153+
table_key={key}
154+
entity={entity}
155+
indented={indented}
156+
/>
157+
))}
112158
</tbody>
113159
</table>
114160
);
@@ -117,7 +163,7 @@ function InspectorPanel({
117163
return (
118164
<div className="inspector-panel">
119165
<div className="panel-header">
120-
<h4 className="title">Inspector Panel</h4>
166+
<h6 className="title">{panelTitle}</h6>
121167
<button
122168
className="close-panel-button"
123169
onClick={() => {
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.property-content {
2+
margin-left: 8px;
3+
}
4+
5+
.property-content p {
6+
margin: 2px 0 !important;
7+
line-height: 1.3;
8+
padding: 0;
9+
}
10+
11+
.property-content strong {
12+
font-size: 11px;
13+
font-weight: 500;
14+
color: #64748b;
15+
}
16+
17+
.panel-row.names,
18+
.panel-row.categories {
19+
overflow: auto;
20+
max-height: 200px;
21+
}
22+
23+
.panel-row.names .property-content > p,
24+
.panel-row.categories .property-content > p {
25+
border-bottom: 1px solid #f1f5f9;
26+
padding-bottom: 4px;
27+
margin-bottom: 4px;
28+
}
29+
30+
.panel-row.names .property-content > p:last-child,
31+
.panel-row.categories .property-content > p:last-child {
32+
border-bottom: none;
33+
margin-bottom: 2px;
34+
}

0 commit comments

Comments
 (0)