Select to view content in your preferred language

How to hide layer in legend and on the map?

3103
0
12-31-2014 02:01 AM
AnatoliiTerentiev
Deactivated User

Dear Gurus!

    In xaml or in code I create layers for the findTask or somethink else, for example:

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

                <esri:FeatureLayer    ID="bridges"                             
                            Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer/2"  >
            </esri:FeatureLayer>
            
            <esri:GraphicsLayer ID="MyGraphicsLayer"  />
            
            </esri:Map>

or in code:

            FeatureLayer fLayer = new FeatureLayer();
            fLayer.Url = "http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer/1";
            fLayer.ID = "routes_new";
            myMap.Layers.Add(fLayer);

How can I make this layers does not appear  in the legend or in the map object?

0 Kudos
0 Replies