Popup Pixel Tolerance

3851
6
11-07-2013 08:34 PM
PatrickWild
New Contributor
Hi all,

Wondering how I increase the pixel tolerance in selecting a line feature for popups? Currently, it is very difficult to select the line feature in a web browser, with a mouse pointer, or using touch on mobile devices like android phone and iPad. It generally takes several trys to engage the popup.

I am not even sure I am using the correct terminology here, since I am new to the JS API. If anyone has an hints or directions to documentation I would be grateful.

Thanks,
PW
6 Replies
BillDaigle
Occasional Contributor III
How are you selecting the line feature? If you're using an identify task, you can set the tolerance on the click event. If using a query task, I think you will need to buffer the point geometry before passing it to the query task.
0 Kudos
EricCromwell1
New Contributor

I am having the same problem with AGO mapping applications.  When I build the web map, pop up sensitivity is fine.  When the data is shared through one of the story map templates you have to be very precise on the spot you click in order to have anything to happen.  Can the sensitivity be adjusted? 

0 Kudos
LuciHawkins
Occasional Contributor III

If you are using identify you can set up a "tolerance" for your IdentifyParameters.

https://developers.arcgis.com/javascript/jsapi/identifyparameters-amd.html

Thanks,

Luci

0 Kudos
ToddHenry1
Occasional Contributor

How do you set that property for a Map Service published to ArcGIS for Server and consumed in ArcGIS Online?

0 Kudos
BillDaigle
Occasional Contributor III

I don't think you can.  ArcGIS Online maps use a default for all query tasks.  It looks like the app creates a buffer (actually an envelope) around the click point .  I doubt it can be updated. 

0 Kudos
YurikoHashimoto1
New Contributor II

I had the same issue when publishing a point feature class rendered at 12 point within the ArcGIS Pro session (45 pixel size in web map) and published to Portal. The 'pop-up click sensitivity radius' or 'hit box' performed fine in the mapping session but when published the user had to click the center of the point in order for the pop-up to open otherwise was met with a no data message. 

The fix (solved by one of my brilliant colleagues) was to work with the 'feature layer service' rather than the map service layer ('https://mapserviceURL' vs 'https://mapserviceURL/0'). The reason for this appears to be that the map service is rendered on the server side, while the feature service is rendered on the client-side. Map image services serve up images of the data, however feature layer services serve the underlying data itself and allows for editing which entails client-side rendering. 

HTH, 

Yuri