<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Obtaining layer information from a LocalFeatureService in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500964#M6164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a lot more involved way to do it, but it also the best and most efficient way. Nice work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Oct 2014 00:00:12 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2014-10-07T00:00:12Z</dc:date>
    <item>
      <title>Obtaining layer information from a LocalFeatureService</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500960#M6160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a LocalFeatureService that I have created with the path to my mpk. I would like to gather the layer names for each layer from the service. When I was working with the WPF SDK there is a FeatureLayers property that returns a collection of LayerDetails (&lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html" title="http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html"&gt;ArcGIS Runtime SDK for Microsoft WPF - Library Reference&lt;/A&gt; ). How can I gather this information with the SDK for .Net?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 21:58:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500960#M6160</guid>
      <dc:creator>LukePatterson</dc:creator>
      <dc:date>2014-10-06T21:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining layer information from a LocalFeatureService</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500961#M6161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you referring to the "GetAllDetails()" method? That's also there in the new SDK:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/desktop/api-reference//html/M_Esri_ArcGISRuntime_Layers_ArcGISDynamicMapServiceLayer_GetAllDetailsAsync.htm" title="https://developers.arcgis.com/net/desktop/api-reference//html/M_Esri_ArcGISRuntime_Layers_ArcGISDynamicMapServiceLayer_GetAllDetailsAsync.htm"&gt;ArcGISDynamicMapServiceLayer.GetAllDetailsAsync Method&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw, I would also suggest you take a look at the new Geodatabase support instead of using MPK files. It could mean you don't need to use local server, and you can render everything as feature layers are high performance. It might very well do everything you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 22:26:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500961#M6161</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2014-10-06T22:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining layer information from a LocalFeatureService</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500962#M6162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually got this figured out. For anyone else looking for the same thing...the code sample below will get the FeatureServiceInfo which has a Layers property that returns the LayerServiceInfo. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var featureService = new LocalFeatureService(mpkPathText.Text);&lt;/P&gt;&lt;P&gt; await featureService.StartAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (featureService.Status == LocalServiceStatus.Running)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layersUrl = featureService.UrlFeatureService + "/layers?f=json";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var webClient = new WebClient();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var stream = await webClient.OpenReadTaskAsync(layersUrl);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var serializer = new DataContractJsonSerializer(typeof(FeatureServiceInfo));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var result = serializer.ReadObject(stream);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 23:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500962#M6162</guid>
      <dc:creator>LukePatterson</dc:creator>
      <dc:date>2014-10-06T23:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining layer information from a LocalFeatureService</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500963#M6163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your quick response. I will definitely take a look at the new Geodatabase support. I am about to check out direct access of shapefiles as well! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 23:43:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500963#M6163</guid>
      <dc:creator>LukePatterson</dc:creator>
      <dc:date>2014-10-06T23:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining layer information from a LocalFeatureService</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500964#M6164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a lot more involved way to do it, but it also the best and most efficient way. Nice work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 00:00:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/obtaining-layer-information-from-a/m-p/500964#M6164</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2014-10-07T00:00:12Z</dc:date>
    </item>
  </channel>
</rss>

