Your listener id (must be unique for all map events)
Your listener function
// When the basemap is changed, display the new basemap id in the console
JMap.Event.Map.on.basemapChanged(
"custom-basemap-changed",
params => {
console.log("currentActiveBasemapId:", params.currentActiveBasemapId)
console.log("newActiveBasemapId:", params.newActiveBasemapId)
}
)
JMap.Event.Map.on.basemapChanged
This event is triggered when the basemap changed.