I am currently querying a point feature class using a com.esri.ags.tasks.supportClasses.Query with a QueryTask finding the points that intersect with a geometry drawn by the user using the Draw Tools. What I need to do is allow the user to draw more than one shape and return all the points that intersect the shapes. I don't know if this is doable in a single call or if I will have to make separate calls for each geometry and merge the resulting data sets together. Any Ideas?
You can do this in one call but it would require you to merge the users geometries into one geometry, as the QueryTask is one expecting one Geometry. I do this in my eSearch widget for the Flex Viewer. Basically if the user draws a multiple polygons then you take the polygon rings and add them to a new polygon and check if the polygon rings are self intersecting and if they do intersect than you nee to simplify the new polygon before using it in the QueryTask.
You can do this in one call but it would require you to merge the users geometries into one geometry, as the QueryTask is one expecting one Geometry. I do this in my eSearch widget for the Flex Viewer. Basically if the user draws a multiple polygons then you take the polygon rings and add them to a new polygon and check if the polygon rings are self intersecting and if they do intersect than you nee to simplify the new polygon before using it in the QueryTask.