AnsweredAssumed Answered

How to set layer visibility in arcgis API for WPF?

Question asked by aviabunin on Oct 30, 2014
Latest reply on Oct 31, 2014 by aviabunin

Dear Gurus!

I have next xaml:

        <esri:Map x:Name="Map" >
            <esri:ArcGISDynamicMapServiceLayer ID="BaseLayer" 
                Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer" />

On the Map I have some point layer, which is not visible at start program. Two questions.

1. How I  can  set it visible in code behind? This code not help:

Map.Layers[0].Visible = true;

2, In FindTask_ExecuteCompleted I get feature which I want set selected. How I can do this? This code does not work:

                foreach (FindResult result in args.FindResults)
                         result.Feature.Selected = true;

3. How I can refresh Map layers?


Thanks in advance!