<?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: Search for Web Maps which contain a specific basemap in ArcGIS Notebooks Questions</title>
    <link>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1103250#M410</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48574"&gt;@Daniel_Hardwick&lt;/a&gt;&amp;nbsp;Yes! Here is how we can only show web maps that are shared publicly and owned by a specific user. Please let me know if this works for you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;items_from_search = gis.content.search(query="&lt;STRONG&gt;owner:&amp;lt;AGOL username&amp;gt;&lt;/STRONG&gt;", item_type="Web Map", outside_org=False, max_items=1000)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for item in items_from_search:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;try:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;if (WebMap(item).basemap.title=="GB Light Grey")&lt;STRONG&gt;&amp;amp;(item.access=='public')&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;display(item)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;except Exception as e:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;print("Unable to check basemap for '{}': {}".format(item.title, e))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are some links related to this topic:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.&amp;nbsp;Search reference–ArcGIS REST API&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. gis.content.search &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.search" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.search&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. How To: Find specific items using queries in the arcgis.gis module with the ArcGIS Python API&amp;nbsp;&lt;A href="https://support.esri.com/en/technical-article/000024383" target="_blank" rel="noopener"&gt;https://support.esri.com/en/technical-article/000024383&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4.&amp;nbsp;Accessing and creating content–ArcGIS API for Python &lt;A href="https://developers.arcgis.com/python/guide/accessing-and-creating-content/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/guide/accessing-and-creating-content/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Sep 2021 19:59:06 GMT</pubDate>
    <dc:creator>xlt208</dc:creator>
    <dc:date>2021-09-29T19:59:06Z</dc:date>
    <item>
      <title>Search for Web Maps which contain a specific basemap</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1095269#M369</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do something quite trivial, but I am relatively new to Notebooks so wondered if someone could help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially all I want to do is find web maps which contain a specific basemap. I have used Notebook previously to do things like find web maps which contain a keyword, such as Planning, using:&lt;/P&gt;&lt;PRE&gt;webmap_search = gis.content.search("Planning", item_type="Web Map")&lt;BR /&gt;webmap_search&lt;/PRE&gt;&lt;P&gt;And I have searched through particular groups to find content within, but I don't know how to search for web maps which contain a certain basemap, for example&amp;nbsp;&lt;A href="https://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/OS_Open_Carto_2/MapServer" target="_blank" rel="noopener"&gt;OS_Open_Carto&lt;/A&gt;. Is this possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 12:11:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1095269#M369</guid>
      <dc:creator>Daniel_Hardwick</dc:creator>
      <dc:date>2021-09-03T12:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Web Maps which contain a specific basemap</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1095448#M370</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello Daniel!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We can loop through the items in the search result and use&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html?arcgis.mapping.WebMap.basemap#arcgis.mapping.WebMap.basemap" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;WebMap.basemap&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;to check their basemaps.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the code snippet below, if the basemap of a web map item matches the basemap we are looking for ("Topographic"), we will display the item in the cell output.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from arcgis.gis import GIS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from arcgis.mapping import WebMap&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gis = GIS("home")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;items_from_search = gis.content.search(query="Redlands", item_type="Web Map", max_items=15, outside_org=True)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for item in items_from_search:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;try:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;if WebMap(item).basemap.title=="Topographic":&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;display(item)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;except Exception as e:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;print("Unable to check basemap for '{}': {}".format(item.title, e))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope this is helpful! Please let me know if you have any questions about this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lingtao&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 21:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1095448#M370</guid>
      <dc:creator>xlt208</dc:creator>
      <dc:date>2021-09-03T21:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Web Maps which contain a specific basemap</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1097117#M375</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/321441"&gt;@xlt208&lt;/a&gt;&amp;nbsp;, that's fantastic.&lt;/P&gt;&lt;P&gt;I have the code now setup as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;items_from_search = gis.content.search(query="", item_type="Web Map",outside_org=False , max_items=1000)&lt;/P&gt;&lt;P&gt;for item in items_from_search:&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;if WebMap(item).basemap.title=="GB Light Grey":&lt;/P&gt;&lt;P&gt;display(item)&lt;/P&gt;&lt;P&gt;except Exception as e:&lt;/P&gt;&lt;P&gt;print("Unable to check basemap for '{}': {}".format(item.title, e))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it works. Is there a way to amend this further to only show webmaps which are shared publicly? Also by Map owner? If there is a some sort of guide with the list of available methods then please feel free to point me towards it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; As I have tried a few with trial and error but can't quite get what I want in terms of only publicly available maps create by a certain user.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:40:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1097117#M375</guid>
      <dc:creator>Daniel_Hardwick</dc:creator>
      <dc:date>2021-09-10T09:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Web Maps which contain a specific basemap</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1103250#M410</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48574"&gt;@Daniel_Hardwick&lt;/a&gt;&amp;nbsp;Yes! Here is how we can only show web maps that are shared publicly and owned by a specific user. Please let me know if this works for you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;items_from_search = gis.content.search(query="&lt;STRONG&gt;owner:&amp;lt;AGOL username&amp;gt;&lt;/STRONG&gt;", item_type="Web Map", outside_org=False, max_items=1000)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for item in items_from_search:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;try:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;if (WebMap(item).basemap.title=="GB Light Grey")&lt;STRONG&gt;&amp;amp;(item.access=='public')&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;display(item)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;except Exception as e:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;print("Unable to check basemap for '{}': {}".format(item.title, e))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are some links related to this topic:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.&amp;nbsp;Search reference–ArcGIS REST API&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. gis.content.search &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.search" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.search&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. How To: Find specific items using queries in the arcgis.gis module with the ArcGIS Python API&amp;nbsp;&lt;A href="https://support.esri.com/en/technical-article/000024383" target="_blank" rel="noopener"&gt;https://support.esri.com/en/technical-article/000024383&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4.&amp;nbsp;Accessing and creating content–ArcGIS API for Python &lt;A href="https://developers.arcgis.com/python/guide/accessing-and-creating-content/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/guide/accessing-and-creating-content/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 19:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1103250#M410</guid>
      <dc:creator>xlt208</dc:creator>
      <dc:date>2021-09-29T19:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Web Maps which contain a specific basemap</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1154384#M493</link>
      <description>&lt;P&gt;I have submitted an enhancement idea at the following URL to allow all of us to do this sort of operation without any coding.&amp;nbsp; If you like it, please give it a kudos and maybe make a comment:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-enterprise-ideas/search-content-by-arcgis-server-url/idc-p/1154030#M2751" target="_blank"&gt;https://community.esri.com/t5/arcgis-enterprise-ideas/search-content-by-arcgis-server-url/idc-p/1154030#M2751&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 17:09:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1154384#M493</guid>
      <dc:creator>RogerDunnGIS</dc:creator>
      <dc:date>2022-03-16T17:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Web Maps which contain a specific basemap</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1506687#M796</link>
      <description>&lt;P&gt;Thank you for this post and these examples. It aided in developing this notebook. I wanted to share in case it was useful.&amp;nbsp;&lt;A href="https://joeguzi.maps.arcgis.com/home/item.html?id=5161d7f097ae40fab7304906ad0f9e67" target="_blank" rel="noopener"&gt;ArcGIS Online Basemap Replacement Notebook Update&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 15:19:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/search-for-web-maps-which-contain-a-specific/m-p/1506687#M796</guid>
      <dc:creator>JoeGuziStarkCountyOH</dc:creator>
      <dc:date>2024-07-18T15:19:28Z</dc:date>
    </item>
  </channel>
</rss>

