Solved! Go to Solution.
<esri:FeatureLayer ID="MyLayer" OutFields="*" Url="yourServiceUrl"> <esri:FeatureLayer.MapTip> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <ItemsControl ItemsSource="{Binding Keys}" Grid.Column="0" /> <ItemsControl ItemsSource="{Binding Values}" Grid.Column="1" /> </Grid> </esri:FeatureLayer.MapTip> </esri:FeatureLayer>
Hello, I managed to make the sample "Identify" from API Silverlight in my application with a service that contains several layers:
Code:
IdentifyTask identifyTask = new IdentifyTask("http://romulus/ArcGIS/rest...../Monde/MapServer")
But in my application, I would be obliged to work with multiple services and each service contains a single layer, for example, to display their attribute table, then when I wanted to test the tools with a service that contains a single layer, it does not work:
Example of Feature Layer: Code:
IdentifyTask identifyTask = new IdentifyTask("http://romulus/ArcGIS/rest/services/CENTRALITE_Administration_Etat/MapServer/2")
So what to do in case I want the Identify fonction on all services that I declared in my Group Layer?
Please help me if you have ideas.
parameters.LayerIds.Add(2); identifyTask.ExecuteAsynch(parameters)
private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e) { MapPoint clickPoint = e.MapPoint; IdentifyParameters identifyParams = new IdentifyParameters() { Geometry = clickPoint, MapExtent = MyMap.Extent, Width = (int) MyMap.ActualWidth, Height = (int) MyMap.ActualHeight, LayerOption = LayerOption.visible, SpatialReference = MyMap.SpatialReference, }; IdentifyTask identifyTask = new IdentifyTask("http://romulus/ArcGIS/rest/services/...../Monde/MapServer") identifyTask.ExecuteCompleted += IdentifyTask_ExecuteCompleted; identifyTask.Failed += IdentifyTask_Failed; identifyTask.ExecuteAsync(identifyParams); }
private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e) { MapPoint clickPoint = e.MapPoint; IdentifyParameters identifyParams = new IdentifyParameters() { Geometry = clickPoint, MapExtent = MyMap.Extent, Width = (int) MyMap.ActualWidth, Height = (int) MyMap.ActualHeight, SpatialReference = MyMap.SpatialReference, }; identifyParams.LayerIds.Add(2); IdentifyTask identifyTask = new IdentifyTask("http://romulus/ArcGIS/rest/services/...../Monde/MapServer") identifyTask.ExecuteCompleted += IdentifyTask_ExecuteCompleted; identifyTask.Failed += IdentifyTask_Failed; identifyTask.ExecuteAsync(identifyParams); }
identifyParams.LayerIds.Add(2);
http://romulus/ArcGIS/rest/services/Axeroute_Luxembourg/MapServer http://romulus/ArcGIS/rest/services/CENTRALITE_Administration_Etat/MapServer