Select to view content in your preferred language

spatial query

641
3
05-08-2012 09:31 AM
YassineEL_JADIDI
Deactivated User
hello,
i want to create a spatial query with differents layers
for example : i want to have cities (points) in a region (polygon).
i hope that anyone have an idea about that.
thank you !
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
You can use FeatureLayer and Editor Select command. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerSelection. If you open up Fiddler, you will see that it performs a query based on the selection box. You can change Editor.SelectionMode to Polygon instead of Rectangle. This is similar to doing this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery except you can add more FeatureLayer in your Map and Editor.Select will perform the spatial query for you.
0 Kudos
YassineEL_JADIDI
Deactivated User
i tried to apply the example in : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerSelection, but it wont work...i had a problem in
<StackPanel  x:Name="EditorToolStrip" Margin="0,5,5,0" DataContext="{StaticResource editor}">
, they told me that the ressource "MyEditor" couldt not be resolved.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
i want to create a spatial query with differents layers
for example : i want to have cities (points) in a region (polygon).

The spatial query task is working with one layer only.
So if you need to create one query by layer.

You can also consider working with Identity or Find tasks thatt are working on one service (i.e possible multiple layers).
Samples here : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify or http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Find
0 Kudos