mirror of
https://github.com/maplibre/martin.git
synced 2024-12-18 20:31:54 +03:00
fix debug.html sources (#853)
This commit is contained in:
parent
197e9e3f07
commit
9d8c8c948e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user