Select line features onClick

Discussion created by davidrenz on Jul 1, 2010
Latest reply on Jul 2, 2010 by digy79
I need to select a line feature and get the ID returned, along with "selecting" that line.
I know how to do that with the ADF, but don't know how to do that with JSAPI.

Also, I need to be able to add multiple line segments to the selectionset.

My thinking here is that i could do this with a Buffer or GP task, but am not sure which way to go about this. The query task popped up, and that looked good too.

Is this a queryTask?
If so, got any examples?

I am currently using a query task with :
query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;

to get the x/y of the click, but am not sure how to select the line.

Could anyone point me in the correct direction?