0

I'm using ArcGIS runtime SDK for .Net, I have an application with only a

ArcGISLocalDynamicMapServiceLayer

which contains a number of feature classes.

How can I get all the layers included in the Dynamic map service layer IN CODE in order to change the visibility of some of the layers individually?

XAML code:

<esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" Cursor="Cross" Extent="330671.7091,2854689.5845,344178.0091,2862125.3845" MouseClick="QueryPoint_MouseClick" IsEnabled="False" IsLogoVisible="False">


            <esri:ArcGISLocalDynamicMapServiceLayer ID="MYLAYERS"   Path="C:\Users\Ahmad Elsayed\Desktop\test app\MODREN UI APP\FinalMap.mpk" />


  </esri:Map>
0

Use the layer.ServiceInfo.Layers to get the service metadata information about the sub layers. The data is available after the layer has been initialized.

You can also use the GetAllDetailsAsync() call go get ALL the detailed info about the sub layers (this is a little more expensive call since a lot of data needs to be downloaded).

https://developers.arcgis.com/net/10-2/desktop/api-reference//html/M_Esri_ArcGISRuntime_Layers_ArcGISDynamicMapServiceLayer_GetAllDetailsAsync.htm

  • The v100.x releases has made all this a lot simpler across different layer types with the sublayer collections – dotMorten Sep 2 '17 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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