multiple feature selection

2085
2
10-27-2011 03:10 PM
suharthachowdhury
New Contributor
Hi,
I have a feature layer. I need to enable multiple feature selection with mouse drag (similar to Editor widget, but I don't have any editing needs). Upon the selection, I need to query the selected features using query task. Can anybody suggest what is the best way to do it? Currently the user has to click each feature to select multiple features and query them altogether. But I want to have the user draw a freehand area and select all features within it. Please share ideas or resources.

Thanks.
0 Kudos
2 Replies
suharthachowdhury
New Contributor
Hi,
I have a feature layer. I need to enable multiple feature selection with mouse drag (similar to Editor widget, but I don't have any editing needs). Upon the selection, I need to query the selected features using query task. Can anybody suggest what is the best way to do it? Currently the user has to click each feature to select multiple features and query them altogether. But I want to have the user draw a freehand area and select all features within it. Please share ideas or resources.

Thanks.


Does anybody have any suggestion on this? I really need some pointers. I hope my explanation makes sense. I am trying to mention it again: I want to select multiple features/graphics on a feature layer with a mouse drag (i.e. drawing a rectangle or area). Upon selection the graphics will be highlighted. Then I want to pass these selected features/graphics to QueryTask to query them for further processing.
Please help.
Thanks.
0 Kudos
JenniferNery
Esri Regular Contributor
You can look at this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave

You will need Editor that binds to your map, set ID property of GraphicsLayer(s) or FeatureLayer(s), set SelectionMode=Rectangle, and subscribe to EditCompleted event. Add a button with DataContext pointing to the Editor. Command binding to Editor.Select. Here's another example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerSelection
0 Kudos