townofsnowflake

querying a single point

Discussion created by townofsnowflake on May 20, 2012
I want to extract attributes from a single point feature, by clicking.  I then want to display the queried attributes in a div. I do not want a popup, infowindow, or new graphic layers drawn.

It has been suggested in a blog post that I need to extend the number of pixels around the map pointer in order to ensure that I grab the feature. I understand the idea behind this- the map pointer is pointing to a single pixel and it is hard to ensure that I am clicking directly on the feature's location. 

However, the code provided in the blog does not work if I simply "copy and paste" into my own script.  I believe it should.

Is it outdated?  If so, is there a new method / suggestions for querying the attributes of a single point?

Outcomes