<?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>idea Create New Feature Layer Collection and Select Layers to Add -- ArcGIS API for Python in Developers Ideas</title>
    <link>https://community.esri.com/t5/developers-ideas/create-new-feature-layer-collection-and-select/idi-p/926093</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that when an item is created from an existing feature layer:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;# Create a new empty comment layer from the already existing base comment layer&lt;/P&gt;&lt;P&gt;layer_properties={&lt;BR /&gt; 'title':'Test_Comment_Layer',&lt;BR /&gt; 'description':'This is a comment layer that is being used for testing purposes only',&lt;BR /&gt; 'tags':'Test, Python, Comment Layer',&lt;BR /&gt; 'type':'Feature Service',&lt;BR /&gt; 'url':'URL HERE'&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;base_comment_layer = gis.content.add(item_properties=layer_properties, data="URL HERE", folder=pf_name)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;that we should be able to choose which layers we would like to add from that Hosted Feature Layer (or Feature Layer Collection):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create feature layer from existing layer:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="335885" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/335885_pastedImage_5.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Specify layers to include:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="335862" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/335862_pastedImage_1.png" style="width: 620px; height: 377px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code will create a Hosted Feature Layer with &lt;STRONG&gt;all layers&lt;/STRONG&gt; included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if I'm wrong... but I would assume that this could be specified in the item_properties described in the content manager section ArcGIS API for Python guide:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.html#contentmanager" title="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.html#contentmanager"&gt;arcgis.gis module — arcgis 1.0.1 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems simple to delete features of a &lt;STRONG&gt;layer&lt;/STRONG&gt;, or to delete the &lt;STRONG&gt;feature layer collection &lt;/STRONG&gt;itself, but to delete a layer&amp;nbsp;&lt;SPAN style="text-decoration: underline;"&gt;that is a part of a feature layer collection&lt;/SPAN&gt; (or specify which layers to include)&amp;nbsp;is not an easy task.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Mar 2017 17:18:29 GMT</pubDate>
    <dc:creator>ZacharyNeumann1</dc:creator>
    <dc:date>2017-03-07T17:18:29Z</dc:date>
    <item>
      <title>Create New Feature Layer Collection and Select Layers to Add -- ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/developers-ideas/create-new-feature-layer-collection-and-select/idi-p/926093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that when an item is created from an existing feature layer:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;# Create a new empty comment layer from the already existing base comment layer&lt;/P&gt;&lt;P&gt;layer_properties={&lt;BR /&gt; 'title':'Test_Comment_Layer',&lt;BR /&gt; 'description':'This is a comment layer that is being used for testing purposes only',&lt;BR /&gt; 'tags':'Test, Python, Comment Layer',&lt;BR /&gt; 'type':'Feature Service',&lt;BR /&gt; 'url':'URL HERE'&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;base_comment_layer = gis.content.add(item_properties=layer_properties, data="URL HERE", folder=pf_name)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;that we should be able to choose which layers we would like to add from that Hosted Feature Layer (or Feature Layer Collection):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create feature layer from existing layer:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="335885" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/335885_pastedImage_5.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Specify layers to include:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="335862" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/335862_pastedImage_1.png" style="width: 620px; height: 377px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code will create a Hosted Feature Layer with &lt;STRONG&gt;all layers&lt;/STRONG&gt; included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if I'm wrong... but I would assume that this could be specified in the item_properties described in the content manager section ArcGIS API for Python guide:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.html#contentmanager" title="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.html#contentmanager"&gt;arcgis.gis module — arcgis 1.0.1 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems simple to delete features of a &lt;STRONG&gt;layer&lt;/STRONG&gt;, or to delete the &lt;STRONG&gt;feature layer collection &lt;/STRONG&gt;itself, but to delete a layer&amp;nbsp;&lt;SPAN style="text-decoration: underline;"&gt;that is a part of a feature layer collection&lt;/SPAN&gt; (or specify which layers to include)&amp;nbsp;is not an easy task.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 17:18:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/create-new-feature-layer-collection-and-select/idi-p/926093</guid>
      <dc:creator>ZacharyNeumann1</dc:creator>
      <dc:date>2017-03-07T17:18:29Z</dc:date>
    </item>
  </channel>
</rss>

