Hello!
I have an app where you can change the active webmap like in this sample.
That works wonderful, but I also have a calcite panel that is populated with the map's description. This also works. But when I change the active map, it does not update to the description of the active map.
How can I get it to update when clicking the button that changes the active webmap?
This is how the description of the first map is put into the panel:
map.when(() => {
const {
title,
description
} = map.portalItem;
document.querySelector("#header-title").textContent = title;
document.querySelector("#item-description").innerHTML = description;
)};
Any help would be much appreciated!