New Chalanges, and once again I don't know how to proceed.Using LayerOption.visible does not work, I search the forum and understand why, but do not find a simple way of identifying visible layers. I have a legend choosing which layers to show on map, I think it is possible to use, but do not know how. All layers of interest for the identify task are in the legend.Second problem, I need to run identify task to different servers. IdentifyTask identifyTask = new IdentifyTask("http://maps.helcom.fi/ArcGIS/rest/services/Shipping/MapServer");
identifyTask.ExecuteCompleted += IdentifyTask_ExecuteCompleted;
identifyTask.Failed += IdentifyTask_Failed;
identifyTask.ExecuteAsync(identifyParams);
I assume it is only to add another task like IdentifyTask identifyTask2 = new IdentifyTask("http://MapServer2");
identifyTask2.ExecuteCompleted += IdentifyTask_ExecuteCompleted;
identifyTask2.Failed += IdentifyTask_Failed;
identifyTask2.ExecuteAsync(identifyParams);
in the identifyParams I suppose I need the LayerIds, I also think it is here I will get some trouble to get the system to know which LayerId is for Mapserver1 and which is for MapServer2 or 3 and so on.I have the identify task working on all layers and from only one server for the moment.I can aly use the identifyParams.LayerIds.Add(4);
to hardcode layers to run the identifyTask on.My plan is to first get it work on the the map visible layers (selected in the legend)next step is to get identify to catch information from several servers and put together to one list.Thank you in advance for all helpful ideas.