<?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 Add Multiple WMTS Layers Simultaneously to AGOL/Enterprise Web Map in ArcGIS Enterprise Ideas</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-ideas/add-multiple-wmts-layers-simultaneously-to-agol/idi-p/1340982</link>
    <description>&lt;P&gt;Currently, when adding WMTS layers to a web map, there is no way to add multiple WMTS layers at a time.&amp;nbsp; For example, if I have 40 individual county layers of imagery,&amp;nbsp; I have to go through the process to add imagery 40 times in the web map.&amp;nbsp; It would be helpful if you could check/select multiple layers to be added simultaneously, similar to the process of adding WMS layers to a web map.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2023 16:10:30 GMT</pubDate>
    <dc:creator>LarryJahn</dc:creator>
    <dc:date>2023-10-24T16:10:30Z</dc:date>
    <item>
      <title>Add Multiple WMTS Layers Simultaneously to AGOL/Enterprise Web Map</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-ideas/add-multiple-wmts-layers-simultaneously-to-agol/idi-p/1340982</link>
      <description>&lt;P&gt;Currently, when adding WMTS layers to a web map, there is no way to add multiple WMTS layers at a time.&amp;nbsp; For example, if I have 40 individual county layers of imagery,&amp;nbsp; I have to go through the process to add imagery 40 times in the web map.&amp;nbsp; It would be helpful if you could check/select multiple layers to be added simultaneously, similar to the process of adding WMS layers to a web map.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 16:10:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-ideas/add-multiple-wmts-layers-simultaneously-to-agol/idi-p/1340982</guid>
      <dc:creator>LarryJahn</dc:creator>
      <dc:date>2023-10-24T16:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add Multiple WMTS Layers Simultaneously to AGOL/Enterprise Web Map</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-ideas/add-multiple-wmts-layers-simultaneously-to-agol/idc-p/1341242#M3500</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12279"&gt;@LarryJahn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This probably is not available through GUI but sure is a good enhancement for future. However, for the time being, I would suggest using python to accomplish this task.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a sample script which can help (will try to explain which step does what, so you can replace things accordingly for your scenario):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#Import the Modules&lt;/STRONG&gt;&lt;BR /&gt;from arcgis.gis import GIS&lt;BR /&gt;from arcgis.mapping import WebMap&lt;BR /&gt;from arcgis.mapping.ogc import WMTSLayer&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# Define your ArcGIS Online credentials&lt;/STRONG&gt;&lt;BR /&gt;username = "your_username"&lt;BR /&gt;password = "your_password"&lt;BR /&gt;gis = GIS("&lt;A href="https://webadaptor.domain.com/webadaptorname" target="_blank"&gt;https://webadaptor.domain.com/webadaptorname&lt;/A&gt;", "username", "password")&lt;/P&gt;&lt;P&gt;web_map_id = "your_web_map_id"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# Load the existing web map&lt;/STRONG&gt;&lt;BR /&gt;web_map = WebMap(gis.content.get(web_map_id))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# List of county WMTS layers you want to add&lt;/STRONG&gt;&lt;BR /&gt;county_layers = [&lt;BR /&gt;{&lt;BR /&gt;"name": "Layer_name",&lt;BR /&gt;"url": "URL",&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Layer_name",&lt;BR /&gt;"url": "URL",&lt;BR /&gt;},&lt;BR /&gt;# Add the rest of your county layers here&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# Loop through the county_layers list and add each layer to the web map&lt;/STRONG&gt;&lt;BR /&gt;for county in county_layers:&lt;BR /&gt;wmts_layer = WMTSLayer(url=county["url"])&lt;BR /&gt;web_map.add_layer(wmts_layer, options={"title": county["name"]})&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# Update the web map with the added layers&lt;/STRONG&gt;&lt;BR /&gt;web_map.update()&lt;/P&gt;&lt;P&gt;print("County layers added to the web map.")&lt;/P&gt;&lt;P&gt;Give it a try and let me know if it helps!&lt;/P&gt;&lt;P&gt;-Archit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 06:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-ideas/add-multiple-wmts-layers-simultaneously-to-agol/idc-p/1341242#M3500</guid>
      <dc:creator>ArchitSrivastava</dc:creator>
      <dc:date>2023-10-25T06:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add Multiple WMTS Layers Simultaneously to AGOL/Enterprise Web Map</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-ideas/add-multiple-wmts-layers-simultaneously-to-agol/idc-p/1360942#M3552</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/59475"&gt;@ArchitSrivastava&lt;/a&gt;&amp;nbsp;Is there a way to query the WMTS for a layer list then loop and add all the layers?&amp;nbsp; With your code I would have to manually list them all but there are a lot.&amp;nbsp; That is why I wanted a script.&lt;/P&gt;&lt;P&gt;I can multiselect in Pro if maybe there is a way to add from there?&amp;nbsp; Trying to add them to an existing map makes it harder.&lt;/P&gt;&lt;P&gt;Also note you can just use&amp;nbsp;gis = GIS('pro')&amp;nbsp; and it grabs your credentials from Pro.&amp;nbsp; That way no storing UN and Pass and it works for all users.&amp;nbsp; Plus works for multifactor and all that.&lt;/P&gt;&lt;P&gt;Edit in the end I just added the service in Pro, did a shift-select on all the layers, added, then published a web map with all of them.&amp;nbsp; Super fast and easy.&amp;nbsp; I could even make nested groups then.&amp;nbsp; Still looking for a way to add to existing maps but it could help someone.&lt;/P&gt;&lt;P&gt;Another edit having all those WMS and WTMS layers in a web map is slowing the map to a halt.&amp;nbsp; Also out of memory issues.&amp;nbsp; Pro is just fine.&amp;nbsp; Bummer really wish the tools could handle more.&amp;nbsp; Too much backend queries.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 20:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-ideas/add-multiple-wmts-layers-simultaneously-to-agol/idc-p/1360942#M3552</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-12-14T20:10:29Z</dc:date>
    </item>
  </channel>
</rss>

