AnsweredAssumed Answered

Larger hitTest intersection area?

Question asked by benzdouglas on Oct 23, 2017
Latest reply on Oct 24, 2017 by benzdouglas

Hi all, I've just started using the ArcGIS Javascript API over the past month or two and it's been great. Most issues I've managed to solve myself or with the help of this forum but I'm stuck on this one:

 

I'm developing an iPad application for my company that requires users to click on polyline graphics, but it's really difficult for people to do this on the iPad screen because fingers are not mouse pointers, and selecting a precise polyline graphic out of a haystack of them is challenging for some.

Is there any way of adjusting how the hitTest function works to look a bit wider for any intersecting graphics? Such that if someone tapped on a x,y coordinate that was just 5 pixels away from another graphic, it could return that graphic in the array?

Or maybe somehow trick the polyline graphics to think they are larger than they are, without giving them an ugly large size?

Or maybe there is another solution using Query... but I haven't yet explored that function.

 

I'm using a FeatureLayer for the polylines and a view.on "click" listener which does the hitTest.

 

Attached is a preview of what I'm dealing with:

Outcomes