Select to view content in your preferred language

How to structure the Identify tool depending on the visibility of layers in listeLaye

730
2
11-15-2012 04:40 AM
BarraLoubna
Deactivated User
Hello, I would like to have an identify tool that works with the list of layers and layers that are displayed or selected in the list of layers and when I adds an other layers, I wish it adds this new layers to the result of the identify.

When I view a single layer is visible and then I click Identify on the map, it give the result of  all layers, even if just only one layer is checked, because in my service all layers are checked and in the opposite case, if I checks a single layer in the MXD, it appear just the result of this layer, even though I checked all the other layers in my application.

View that when launching the application there is only one layer that appears after and according to the need of the user, he can add or remove a layer to another.
for indication, the layers in my mxd are all checked, and when I call the featurelayer in xaml I specify if I want the layer visible or not.  exemple :
<esri1:FeatureLayer ID="......."  Visible="False" Url=''....'' ...>
<esri1:FeatureLayer ID="......."  Visible="True" Url=''....'' ...>

Then, I would that Identifytool  operates  with the visibility of layers in the layers list and it displays or removes the result of the identifications according to the needs of each user.

I think I should change the url in the code below  by an element which call the list of layers or grouplayers ...!?

IdentifyTask identifyTask = new IdentifyTask("http://romulus/ArcGIS/rest/services/Limites_Administratives_Luxembourg/MapServer");
....

There is someone who has already done this? there is someone who has an idea.
0 Kudos
2 Replies
ChrisBradberry
Deactivated User
Hey,

I think that you want to set the "LayerOption = LayerOption.visible" in the "IdentifyParameters()" in the code behind.  See the sample: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#Identify

Chris
0 Kudos
BarraLoubna
Deactivated User
Hello,

Thank you for your answer, just for accuracy, I have already specified this option:  "LayerOption = LayerOption.visible"  in the code behind. 

You can see my post here :  http://forums.arcgis.com/threads/29001-Identify-problem?p=249570#post249570.

Thank you.
0 Kudos