<?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 add_layer works but feature collection symbology is wrong.  Exent also is not recognized. in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/add-layer-works-but-feature-collection-symbology/m-p/1063535#M6157</link>
    <description>&lt;P&gt;I am attempting to add a few layers from a single feature collection in to an existing webmap (Ecology_Map) on AGOL.&amp;nbsp; The feature collection consist of a point and a polygon layer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoeNunn_1-1622552193471.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14677i2BD4EF8131AC65EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoeNunn_1-1622552193471.png" alt="JoeNunn_1-1622552193471.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the add_layer function which adds the feature collection however the polygon seems to be symbolized as a point (the same as the first layer in the collection):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoeNunn_0-1622552111841.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14676i7A2670CDAE254029/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoeNunn_0-1622552111841.png" alt="JoeNunn_0-1622552111841.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code used is here - it is a script I used in Pro&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        lyrsToAdd = gis.content.search(query="title:"+service_name, item_type="Feature Layer")
        extent = lyrsToAdd[0].extent
        Ecology_Map = WebMap(item)
        Ecology_Map.add_layer(lyrsToAdd[0])
        Ecology_Map.update(item_properties={'extent': extent})   &lt;/LI-CODE&gt;&lt;P&gt;In addition the&amp;nbsp;Ecology_Map&amp;nbsp; extent is not changed to the extent of the feature collection.&amp;nbsp; Any ideas where I am going wrong?&lt;/P&gt;&lt;P&gt;Many thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 13:06:47 GMT</pubDate>
    <dc:creator>JoeNunn</dc:creator>
    <dc:date>2021-06-01T13:06:47Z</dc:date>
    <item>
      <title>add_layer works but feature collection symbology is wrong.  Exent also is not recognized.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/add-layer-works-but-feature-collection-symbology/m-p/1063535#M6157</link>
      <description>&lt;P&gt;I am attempting to add a few layers from a single feature collection in to an existing webmap (Ecology_Map) on AGOL.&amp;nbsp; The feature collection consist of a point and a polygon layer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoeNunn_1-1622552193471.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14677i2BD4EF8131AC65EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoeNunn_1-1622552193471.png" alt="JoeNunn_1-1622552193471.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the add_layer function which adds the feature collection however the polygon seems to be symbolized as a point (the same as the first layer in the collection):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoeNunn_0-1622552111841.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14676i7A2670CDAE254029/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoeNunn_0-1622552111841.png" alt="JoeNunn_0-1622552111841.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code used is here - it is a script I used in Pro&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        lyrsToAdd = gis.content.search(query="title:"+service_name, item_type="Feature Layer")
        extent = lyrsToAdd[0].extent
        Ecology_Map = WebMap(item)
        Ecology_Map.add_layer(lyrsToAdd[0])
        Ecology_Map.update(item_properties={'extent': extent})   &lt;/LI-CODE&gt;&lt;P&gt;In addition the&amp;nbsp;Ecology_Map&amp;nbsp; extent is not changed to the extent of the feature collection.&amp;nbsp; Any ideas where I am going wrong?&lt;/P&gt;&lt;P&gt;Many thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 13:06:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/add-layer-works-but-feature-collection-symbology/m-p/1063535#M6157</guid>
      <dc:creator>JoeNunn</dc:creator>
      <dc:date>2021-06-01T13:06:47Z</dc:date>
    </item>
  </channel>
</rss>

