AnsweredAssumed Answered

JS API 3x on selection event not firing

Question asked by dhcn_global on Jul 17, 2019
Latest reply on Jul 17, 2019 by kenbuja

I want an event to fire when a selection is made on a specific layer.

This is my code:

lyr = this.map.getLayer("Grunddata_public_7660");
console.log(lyr);
lyr.on("selection-complete", function() {
alert("lyr selected");
});

I am in doubt of where I go wrong.

Outcomes