Hi everyone, I wanna do query with where clauses but when result come, result's selected features must be inside visible mapview.I mean that think about mapview center point and draw a polygon around center point and when i execute query task , give me result inside this polygon. I hope that you understand what i wrote.
Regard
Görkem KARADOĞAN
If i understand you correctly, i think the following will work.
You can get the extent from the MapView using the getExtent() method. This returns you a polygon geometry.
In your QueryTasks QueryParameters class, set the geometry obtained from the MapView using the setGeometry() method, also call setSpatialRelationship to be INTERSECTS. You can then specify a where clause if you like too using the setWhere() method.
I hope that works for you.
Will