Select to view content in your preferred language

FeatureLayer with Selection Mode and QueryTask.

2064
2
02-08-2012 06:18 PM
SanajyJadhav
Deactivated User
Hello,

I would not say I fully get the concept of FeatureLayer in Selection mode.It seems like showing showing only the selected features from the feature layer.Please correct me if I am wrong.

If it is the case then, can we say that it is same as executing the query on the layer in the map service and hi-lighting its results.

Then could it be summarized that rendering the FeatureLayer in selection mode is equivalent to executing query on the map service layer and showing the result on the map.I would appreciate if anybody could help me get this concept. That means I instead of firing the query, I can just add featurelayer in selection mode.

Thanks.
0 Kudos
2 Replies
RuiShen
Occasional Contributor
Hi Sanjay,
I think you are right about this. If you see the web request sent to the server when using the selection mode, you will see it is actually sending a spatial query.


Rui
0 Kudos
JenniferNery
Esri Regular Contributor
The following concept page might help: http://help.arcgis.com/en/webapi/silverlight/help/index.html#//016600000015000000



Selection only�??Does not initially request any features. Features are added only when a selection is made. Selection only mode is useful when you cannot or do not want to bring all features into the client, but you want to highlight one or more features for a certain reason. In most cases, this mode is used in conjunction with a dynamic map service layer to display the location of selected features.


In the following SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerSelection, ArcGISDynamicMapServiceLayer shows an image of where the features are. Using selection tools, we run a query against the feature service and bring them to client FeatureLayer. They only get added to the layer upon selection. Thus, making it look like you are highlighting from ArcGISDynamicMapServiceLayer. The FeatureLayer in this sample use YellowRenderer to differentiate features that are on the layer from features that only exist on server.
0 Kudos