Feature Layer click not fired when clicked on label

715
1
03-02-2017 08:50 AM
Haider_Ali
Occasional Contributor

I want to fire click event of feature layer graphic even when user clicked on its label but layer click event is not firing , it is by design this way or there is some issue, i can get the label graphic on map click from _internal_LabelLayer  but i cant get the graphic on which label is placed by simple way.

Hard way is that i check all the feature layer graphic if label point contain in any polygon by using geometryEngine. Is there any other way?

Below is the fiddle , click on the label of states to see no alert is generated.

Label click - JSFiddle 

Tags (1)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Haider,

   That is by design as the label is a separate graphic with it own event lifecycle. I am not aware of an easy way to get the graphic that the label is associated with. 

0 Kudos