<?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: Adding multiple feature layers from the same feature service in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-multiple-feature-layers-from-the-same/m-p/805682#M2165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response, Charles.&amp;nbsp; Adding the feature server does create a group layer containing all the feature layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A follow-up question: it is possible for the FeatureServer to get updated with a new layer.&amp;nbsp; How would I add&amp;nbsp;this new layer to the group, or somehow "refresh" the group layer for any new layers?&amp;nbsp; I tried something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// groupLayer = the existing group layer&lt;/P&gt;&lt;P&gt;// "layer 5" is the newly available layer in the FeatureServer&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LayerFactory.Instance.CreateLayer(new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;... url here.../FeatureServer/5"), groupLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But returns null as before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2018 15:34:09 GMT</pubDate>
    <dc:creator>MarkGumban</dc:creator>
    <dc:date>2018-05-08T15:34:09Z</dc:date>
    <item>
      <title>Adding multiple feature layers from the same feature service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-multiple-feature-layers-from-the-same/m-p/805680#M2163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;In my addin, I can successfully add a feature layer from a feature server to the current map using the LayerFactory, for example, adding layer 0:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;LayerFactory.Instance.CreateFeatureLayer(new Uri("&lt;/SPAN&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3Aport%2F...%2FFeatureServer%2F0" rel="nofollow" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://localhost:port/.../FeatureServer/0&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;"), map);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;If I try to add a different layer (from the same server), say layer 1, such as:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;LayerFactory.Instance.CreateFeatureLayer(&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;new Uri("&lt;/SPAN&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3Aport%2F...%2FFeatureServer%2F1" rel="nofollow" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://localhost:port/.../FeatureServer/1&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;,&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;The function returns null.&amp;nbsp; Using a tool like Fiddler shows that ArcGIS does not even attempt to contact the server given the URL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Is there a particular process one should follow when adding feature layers from the same feature server?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 14:08:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-multiple-feature-layers-from-the-same/m-p/805680#M2163</guid>
      <dc:creator>MarkGumban</dc:creator>
      <dc:date>2018-05-07T14:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple feature layers from the same feature service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-multiple-feature-layers-from-the-same/m-p/805681#M2164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the path to the FeatureServer itself. You should get a parent composite layer ("group") that contains all of the individual layer end points (however many there are).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt;LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F....url" rel="nofollow" target="_blank"&gt;http://....url&lt;/A&gt;&lt;SPAN&gt; here.../FeatureServer"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; UriKind&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Absolute&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 17:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-multiple-feature-layers-from-the-same/m-p/805681#M2164</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2018-05-07T17:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple feature layers from the same feature service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-multiple-feature-layers-from-the-same/m-p/805682#M2165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response, Charles.&amp;nbsp; Adding the feature server does create a group layer containing all the feature layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A follow-up question: it is possible for the FeatureServer to get updated with a new layer.&amp;nbsp; How would I add&amp;nbsp;this new layer to the group, or somehow "refresh" the group layer for any new layers?&amp;nbsp; I tried something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// groupLayer = the existing group layer&lt;/P&gt;&lt;P&gt;// "layer 5" is the newly available layer in the FeatureServer&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LayerFactory.Instance.CreateLayer(new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;... url here.../FeatureServer/5"), groupLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But returns null as before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2018 15:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-multiple-feature-layers-from-the-same/m-p/805682#M2165</guid>
      <dc:creator>MarkGumban</dc:creator>
      <dc:date>2018-05-08T15:34:09Z</dc:date>
    </item>
  </channel>
</rss>

