0

I need to determine number of layers in a given .mpk file and then enumerate it using ArcGis Runtime SDK for WPF 10.2.

Can anyone provide me some link or code/snippet?

closed as off-topic by PolyGeo May 21 at 23:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

1
   private void Button_Click(object sender, RoutedEventArgs e)
        {
            int i = myMap.Layers.Count;

            ArcGISDynamicMapServiceLayer dynLayer = myMap.Layers[0] as ArcGISDynamicMapServiceLayer;
            List<string> plist = new List<string>();
            foreach(LayerInfo  layerinfo in dynLayer.Layers)
            {

                plist.Add(layerinfo.Name);

            }
        }

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.