How to determine the number of the layer by it's name

4038
1
12-30-2014 12:59 AM
AnatoliiTerentiev
Occasional Contributor III

Dear Gurus!

In some  tasks you must specify the LayerIds. How to define it when I know it's name?

For example in Identify task I use code:

            ESRI.ArcGIS.Client.Tasks.IdentifyParameters identifyParams = new IdentifyParameters()
            {
                Geometry = clickPoint,
                MapExtent = Map.Extent,
                Width = (int)Map.ActualWidth,
                Height = (int)Map.ActualHeight,
                LayerOption = LayerOption.all,
                SpatialReference = Map.SpatialReference
                ,
                Tolerance = 30
            };
            identifyParams.LayerIds.Add(2);
            identifyParams.LayerIds.Add(3);

But sometimes  it is necessary to change the sequence of layers before the next publication.

0 Kudos
1 Reply
AnatoliiTerentiev
Occasional Contributor III
0 Kudos