Your listener id (must be unique for all layer events)
Your listener function
// Each time a layer's source has changed, it will display a message
// in the console
JMap.Event.Layer.on.sourceChange(
"custom-source-change",
params => {
console.log(`Source for layer id="${params.layerId}" has changed"`)
}
)
JMap.Event.Layer.on.sourceChange
This event is triggered when a layer's source has changed (for instance after modifying, adding or deleting a feature).