Skip to content

Commit

Permalink
fix debug.html sources (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Aug 30, 2023
1 parent 197e9e3 commit 9d8c8c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@
}

map.on('load', async function () {
const sources = Object.values(await fetch(
'http://0.0.0.0:3000/catalog'
).then((r) => r.json()));
const catalog = await fetch('http://0.0.0.0:3000/catalog');
const sources = (await catalog.json()).tiles;

// Set up the corresponding toggle button for each layer.
for (const [id, source] of Object.entries(sources.tiles)) {
// TODO: we may want to show each source metadata on hover or some other way?
for (const [id, source] of Object.entries(sources)) {
// Skip layers that already have a button set up.
if (document.getElementById(id)) {
continue;
Expand Down

0 comments on commit 9d8c8c9

Please sign in to comment.