Skip to content

Commit

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

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

// 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((await sources.json()).tiles)) {
// Skip layers that already have a button set up.
if (document.getElementById(id)) {
continue;
Expand Down

0 comments on commit ec12908

Please sign in to comment.