<?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: Configure Layer definition using the Python API? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098297#M6635</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/464699"&gt;@ngrid_ShelbyZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;If you want to query feature layers, the following link provides some good examples of querying feature layers:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/" target="_blank"&gt;https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Sep 2021 01:06:36 GMT</pubDate>
    <dc:creator>MehdiPira1</dc:creator>
    <dc:date>2021-09-15T01:06:36Z</dc:date>
    <item>
      <title>Configure Layer definition using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098146#M6633</link>
      <description>&lt;P&gt;Hello API Community,&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I'm working to automatically copy maps using the Clone Content function. Part of this process is to alter layer definitions for each cloned map. I am looking to create a map, and query a layer in said map where job = A, then clone another map, and query layers where job = B. I don't see anywhere in the API where layers can&amp;nbsp; be configured to allow queries.&lt;/P&gt;&lt;P data-unlink="true"&gt;I see in the &lt;A href="https://developers.arcgis.com/python/guide/updating-feature-layer-properties/" target="_self"&gt;Service Definition portion of the documentation&lt;/A&gt;, a layer can have many parameters set, but I don't see a layer definition/query is one of them.&lt;/P&gt;&lt;P data-unlink="true"&gt;I am wondering if anyone knows how a layer's query/definition can be changed programmatically?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 16:51:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098146#M6633</guid>
      <dc:creator>ngrid_ShelbyZ</dc:creator>
      <dc:date>2021-09-14T16:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Layer definition using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098297#M6635</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/464699"&gt;@ngrid_ShelbyZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;If you want to query feature layers, the following link provides some good examples of querying feature layers:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/" target="_blank"&gt;https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 01:06:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098297#M6635</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2021-09-15T01:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Layer definition using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098415#M6638</link>
      <description>&lt;P&gt;Maybe Im not being clear. I'm trying to add layer to a map while specifying a query on layers in that map. I dont see a corresponding parameter that can be set on a layer. Can you confirm if this is not possible via the &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html?highlight=add_layer" target="_self"&gt;Python API Add_Layer Function&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;Create and Add Layer to Web Map&lt;/P&gt;&lt;P&gt;Set Layer to show Where type= 'Apples'&lt;/P&gt;&lt;P&gt;Save Layer and Map&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 13:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098415#M6638</guid>
      <dc:creator>ngrid_ShelbyZ</dc:creator>
      <dc:date>2021-09-15T13:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Layer definition using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098804#M6642</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/464699"&gt;@ngrid_ShelbyZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, that's possible. See the code snippet below:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# get the layer
buffer_item = gis.content.get('item_id')
# add the layer with query to the web map with a new title/name
web_map.add_layer(buffer_item.layers[0].query("Location_Status = 'Active'"),options={'title':'Active Buffers'})
# save as a new web map
webmap_item_properties = {'title':'Some Active Areas',
                         'snippet':'Map created using Python API showing locations',
                         'tags':['automation', 'webmap', 'features', 'python']}

web_map.save(webmap_item_properties)&lt;/LI-CODE&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Mehdi&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 02:20:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098804#M6642</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2021-09-16T02:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Layer definition using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098981#M6647</link>
      <description>&lt;P&gt;Mehdi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, this is the solution Im looking for. I'm wondering what format it creates? It seems to be a different format than a normal feature service. Notice how you cant navigate to a description of the service, and the dropdown list of the layer is different. Do you know if this is different that a hosted feature service?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="44.png" style="width: 794px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23163i4CC8BBD8F7C5793C/image-size/large?v=v2&amp;amp;px=999" role="button" title="44.png" alt="44.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="45.png" style="width: 547px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23164i0975AC9E9421D2AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="45.png" alt="45.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 16:34:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1098981#M6647</guid>
      <dc:creator>ngrid_ShelbyZ</dc:creator>
      <dc:date>2021-09-16T16:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Layer definition using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1099768#M6663</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/464699"&gt;@ngrid_ShelbyZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Glad that was helpful.&lt;/P&gt;&lt;P&gt;This is a temporary feature layer which still does not exist in the Content.&lt;/P&gt;&lt;P&gt;To make it permanent, you need to Save it as layer and create a new item.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MehdiPira1_1-1632115880536.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23356i77B4C769D634118C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MehdiPira1_1-1632115880536.png" alt="MehdiPira1_1-1632115880536.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 05:32:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/configure-layer-definition-using-the-python-api/m-p/1099768#M6663</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2021-09-20T05:32:38Z</dc:date>
    </item>
  </channel>
</rss>

