AnsweredAssumed Answered

Workaround to ignore a label layer when click?

Question asked by sarahclark on Mar 25, 2015
Latest reply on Dec 14, 2018 by GuignardS

I currently have a feature layer with a click event, and a label layer drawing on top of that to label the features. If I click the feature where there is a label, that label dom node blocks the click event on the feature layer.


In my ideal world the 'disableMouseEvents()' method on an "esri/layers/LabelLayer" would also pass off click events to the layer directly beneath it. In that sense it would be transparent, but just for clicks...


Has anyone else dealt with this? My current ideas are:

- Hard code the feature layer information into a special function triggered on the label layer click

- Generalize a label layer click function, so that it does a spatial query around it for affected layers and selects the layer with the highest map index