Skip to content

Commit

Permalink
Paircoding
Browse files Browse the repository at this point in the history
  • Loading branch information
rebert committed Nov 11, 2024
1 parent f823a0a commit e674fad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions chsdi/static/doc/source/api/faq/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,21 @@ The following list contains all the free accessible layers:
id: layerId,
...layersConfig[layerId],
}
});
}).filter((layer) => !layer.id.endsWith("_3d") && !layer.parentLayerId);
// sorting all layers alphabetically by ID
allLayers.sort((layer1, layer2) => layer1.id.localeCompare(layer2.id));
sections.forEach((section) => {
const layers = allLayers.filter(section.filter);
let layerTable = `<br /><table style="border: none;">`;
layerTable += layers.map((layer, counter) => {
let layerRow = `<tr>`;
layerRow += `<td>${counter}</td>`;
layerRow += `<td>${counter + 1}</td>`;
layerRow += `<td style="text-transform: uppercase">${layer.type}</td>`;
layerRow += `<td><a target="_blank" href="https://map.geo.admin.ch/?layers=${layer.id}">${layer.id}</a>&nbsp;${layer.label}</td>`;
layerRow += `<td style="text-transform: capitalize">${layer.type}</td>`;
layerRow += `</tr>`;
return layerRow;
})
}).join('')
layerTable += `</table>`;
const sectionElement = document.getElementById(section.identifier);
if (sectionElement) {
Expand Down

0 comments on commit e674fad

Please sign in to comment.