AnsweredAssumed Answered

Tolerance discrepancy

Question asked by evtguy on Aug 8, 2014
Latest reply on Jul 7, 2015 by btfou

In the app I'm developing, I'm using featureLayer.on("click",...) to control when the infoWindow content is displayed. What I've noticed is that I can click and select a feature in the layer without triggering that click event. The end result is that my infoWindow information does not appear.


To illustrate this, I have taken one of the ESRI samples and made a Fiddle of it: My Sample


In the sample (and my app in development), I am using featureLayer.on("mouse-enter",...) to change the mouse icon to a pointer to indicate to the user that the feature can be clicked. What I'm noticing is that if the mouse is close to the feature but not truly "over it", you can click and select it due to some mystical tolerance. That's fine for ESRI's sample but, in my app, that means that my infoWindow content doesn't get displayed.


What I need is consistency: if the mouse icon does not change to a pointer (i.e. the mouse is actually over the feature), then a click should NOT select the feature. How can I accomplish this? I couldn't find a reference to a tolerance with the exception of IdentifyTask.