<?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 a basemap from Basemap Gallery Widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-a-basemap-from-basemap-gallery-widget/m-p/1274163#M80709</link>
    <description>&lt;P&gt;I want to add the base map gallery widget to a code and I want to customize the base maps that become available to the user.&lt;/P&gt;&lt;P&gt;In this case I want to remove the ESRI ocean base map from the widget.&lt;/P&gt;&lt;P&gt;Does anybody know how to do this?&lt;/P&gt;&lt;P&gt;Or would I have to manually add the other base maps?&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2023 16:24:21 GMT</pubDate>
    <dc:creator>arc_ticodex</dc:creator>
    <dc:date>2023-03-31T16:24:21Z</dc:date>
    <item>
      <title>Remove a basemap from Basemap Gallery Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-a-basemap-from-basemap-gallery-widget/m-p/1274163#M80709</link>
      <description>&lt;P&gt;I want to add the base map gallery widget to a code and I want to customize the base maps that become available to the user.&lt;/P&gt;&lt;P&gt;In this case I want to remove the ESRI ocean base map from the widget.&lt;/P&gt;&lt;P&gt;Does anybody know how to do this?&lt;/P&gt;&lt;P&gt;Or would I have to manually add the other base maps?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 16:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-a-basemap-from-basemap-gallery-widget/m-p/1274163#M80709</guid>
      <dc:creator>arc_ticodex</dc:creator>
      <dc:date>2023-03-31T16:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a basemap from Basemap Gallery Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-a-basemap-from-basemap-gallery-widget/m-p/1274773#M80724</link>
      <description>&lt;P&gt;Create your own custom basemap gallery, and add the ones you want. Look at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-basemapgallery/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-basemapgallery/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 16:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-a-basemap-from-basemap-gallery-widget/m-p/1274773#M80724</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2023-04-03T16:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a basemap from Basemap Gallery Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-a-basemap-from-basemap-gallery-widget/m-p/1288771#M81149</link>
      <description>&lt;P&gt;You can use the &lt;FONT face="andale mono,times"&gt;filterFunction&lt;/FONT&gt; on &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html#filterFunction" target="_self"&gt;PortalBasemapsSource&lt;/A&gt; to filter basemaps in the BasemapGallery. Starting at version 4.27 (planned release in June), you will be able to pass in an asynchronous filter function, allowing you to load the basemap before filtering, like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const basemapGallery = new BasemapGallery({
        view: view,
        source: {
          portal: "https://arcgis.com",
          // async filterFunction supported starting at v4.27
          filterFunction: async (item, index, basemaps) =&amp;gt; {
            let bool = true;
            await item.load().then((loadedBasemap) =&amp;gt; {
              // filter out the Oceans basemap
              if (loadedBasemap.title == "Oceans") {
                bool = false;
              }
            })
            return bool;
          }
        }
      });&lt;/LI-CODE&gt;&lt;P&gt;Here's an example using the &lt;A href="https://github.com/Esri/feedback-js-api-next" target="_self"&gt;development (/next) version&lt;/A&gt; of the API: &lt;A href="https://codepen.io/annefitz/pen/VwEZNEP" target="_blank"&gt;https://codepen.io/annefitz/pen/VwEZNEP&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 20:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-a-basemap-from-basemap-gallery-widget/m-p/1288771#M81149</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2023-05-12T20:44:22Z</dc:date>
    </item>
  </channel>
</rss>

