<?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 Remove/Add hosted tile layer from Webmap in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/remove-add-hosted-tile-layer-from-webmap/m-p/1367350#M9488</link>
    <description>&lt;P&gt;I have a webmap in which Hosted tile layer needs to be updated with new hosted tile layer.&lt;BR /&gt;I need to use arcgis api for python only.&lt;BR /&gt;I was trying to use(not working):&lt;/P&gt;&lt;P&gt;gis.content.replace_service(item_name, vtpk_service_item.id)&lt;/P&gt;&lt;P&gt;Then I tried:&lt;BR /&gt;tile_layers = [layer for layer in web_map_obj.layers if "_VectorTile_" in str(layer.title)]&lt;BR /&gt;for layer in tile_layers:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; web_map_obj.remove_layer(layer)&lt;/P&gt;&lt;P&gt;Followed by:&lt;BR /&gt;&lt;BR /&gt;EHPLyr=gis.content.get("ID_of_HOSTED_TILE_LAYER")&lt;BR /&gt;web_map_obj.add_layer(EHPLyr)&lt;BR /&gt;item_properties_dict = {"title": "aaa","tags": ["HostedTiledLayer"],"snippet":"", "description":_summary}&lt;BR /&gt;web_map_obj.save(item_properties = item_properties_dict)&lt;/P&gt;&lt;P&gt;The above code is also not working.&lt;BR /&gt;Any idea how to go about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jan 2024 14:47:29 GMT</pubDate>
    <dc:creator>Rahul_Pandia</dc:creator>
    <dc:date>2024-01-08T14:47:29Z</dc:date>
    <item>
      <title>Remove/Add hosted tile layer from Webmap</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/remove-add-hosted-tile-layer-from-webmap/m-p/1367350#M9488</link>
      <description>&lt;P&gt;I have a webmap in which Hosted tile layer needs to be updated with new hosted tile layer.&lt;BR /&gt;I need to use arcgis api for python only.&lt;BR /&gt;I was trying to use(not working):&lt;/P&gt;&lt;P&gt;gis.content.replace_service(item_name, vtpk_service_item.id)&lt;/P&gt;&lt;P&gt;Then I tried:&lt;BR /&gt;tile_layers = [layer for layer in web_map_obj.layers if "_VectorTile_" in str(layer.title)]&lt;BR /&gt;for layer in tile_layers:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; web_map_obj.remove_layer(layer)&lt;/P&gt;&lt;P&gt;Followed by:&lt;BR /&gt;&lt;BR /&gt;EHPLyr=gis.content.get("ID_of_HOSTED_TILE_LAYER")&lt;BR /&gt;web_map_obj.add_layer(EHPLyr)&lt;BR /&gt;item_properties_dict = {"title": "aaa","tags": ["HostedTiledLayer"],"snippet":"", "description":_summary}&lt;BR /&gt;web_map_obj.save(item_properties = item_properties_dict)&lt;/P&gt;&lt;P&gt;The above code is also not working.&lt;BR /&gt;Any idea how to go about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 14:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/remove-add-hosted-tile-layer-from-webmap/m-p/1367350#M9488</guid>
      <dc:creator>Rahul_Pandia</dc:creator>
      <dc:date>2024-01-08T14:47:29Z</dc:date>
    </item>
  </channel>
</rss>

