Solved! Go to Solution.
Then,I must declare all my services separatly in C #:
C # code:
IdentifyTask identifyTask IdentifyTask = new ("http://romulus/ArcGIS/rest/.../Continents/MapServer"'
IdentifyTask identifyTask IdentifyTask = new ("http://romulus/ArcGIS/rest/.../Pays/MapServer");
IdentifyTask identifyTask IdentifyTask = new ("http://romulus/ArcGIS/rest/.../Communes/MapServer");
....
You are not declaring your services separately, your services are your services. An IdentifyTask (as does any rest call) has a single rest endpoint. If you want to make calls into different services than you are making method calls on multiple rest endpoints. This is not something in the ESRI API causing a problem, this is how rest works. Tasks are simply convenient easy to use wrappers for rest method calls,
An option if you only want one IdentifyTask call would be to create a 'super' service that is not visible in the map. The IdentifyTask could be run against this service instead of needing to run against multiple services.
Hope that helps
-Joe
I will try to create a service that does not appear on my application, but only to operate the Identify tool and I will get back to you to inform you of the results. Thank you very much for your cooperation
I made an error before, there is no reason why that service would need to be in your map and not visible. The service simply needs to exist on the server
Good luck
-Joe
Can you give me an example, please!? How I can call the service when operating the Identify tool without adding in the code and where place in the code??
I still waiting for your help, if you want!!!!
IdentifyTask task = new IdentifyTask("http://romulus/arcgis/rest/AllLayerService/MapServer"); //Your parameters define the sub layers used task.ExecuteAsync(parameters);
For this particular aspect of your question, note that the arcgis.com viewer doesn't allow to save configuation (popoup, symbology...) at the service level. It is only possible at the map level.
To save at the service level, you can use ArcGIS Online Explorer.
For Each layer As Layer In MapaGIS.Layers If layer.GetValue(Document.PopupTemplatesProperty) IsNot Nothing Then amsCapasMapa = TryCast(layer, ArcGISDynamicMapServiceLayer) idcDIccionario = TryCast(layer.GetValue(Document.PopupTemplatesProperty), IDictionary(Of Integer, DataTemplate)) For Each linInformacionCapa As LayerInfo In amsCapasMapa.Layers If ((dblEscalaMapa > linInformacionCapa.MaxScale AndAlso dblEscalaMapa < linInformacionCapa.MinScale) OrElse (linInformacionCapa.MaxScale = 0.0 AndAlso linInformacionCapa.MinScale = 0.0) OrElse (dblEscalaMapa > linInformacionCapa.MaxScale AndAlso linInformacionCapa.MinScale = 0.0)) AndAlso idcDIccionario.ContainsKey(linInformacionCapa.ID) Then ' id present in dictionary intLayerID = linInformacionCapa.ID dtmInformacionCapa = idcDIccionario(linInformacionCapa.ID) Exit For End If Next linInformacionCapa End If Next