Select to view content in your preferred language

Android: Click on Graphic Problem

876
2
05-10-2011 02:57 PM
Gregme
by
Emerging Contributor
Hi:

I'm having problems with a mobile JavaScript based site I am building when trying to get the click event on a graphic to fire. The same problem occurs on one of the samples:

http://help.arcgis.com/en/webapi/javascript/arcgis/demos/widget/widget_infowindow.html

What happens on my site, like this site, is that only rarely when I click on one of the graphics on the map does the click event fire. Just like the sample, this does not occur in Desktop Chrome browser, IR or on the iPhone.

Any suggestions?

Thanks,
Greg
0 Kudos
2 Replies
KellyHutchins
Esri Notable Contributor
For Android, you many need to increase the click tolerance. The default value that we use is 5 pixels. You can increase this using the following after the page loads:

esri.layers._GraphicsContainer.prototype._tolerance = 15;
0 Kudos
Gregme
by
Emerging Contributor
That worked! Thanks so much!

For Android, you many need to increase the click tolerance. The default value that we use is 5 pixels. You can increase this using the following after the page loads:

esri.layers._GraphicsContainer.prototype._tolerance = 15;
0 Kudos