Your listener id (must be unique for all layer events)
Your listener function
// Each time a vector layer selectability will change, it will display the next selectability
// in the console
JMap.Event.Layer.on.selectabilityWillChange(
"custom-selectability-will-change",
params => {
console.log(`Vector layer id="${params.layerId}" next selectability="${params.selectability}"`)
}
)
JMap.Event.Layer.on.selectabilityWillChange
This event is triggered just before a vector layer selectability is changed. This permits to act on selection before the layer selectability property is effectively changed