<?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: Map Component using custom Basemap in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-component-using-custom-basemap/m-p/1600608#M86776</link>
    <description>&lt;P&gt;There's a couple of ways you could do this.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a custom basemap and assign it to element.map.basemap.&lt;/LI&gt;&lt;LI&gt;Create a map with custom basemap and assign the map the element.map&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here is a demo with second option. It's really a preference on your part.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/emYPBBB?editors=1000" target="_blank"&gt;https://codepen.io/odoe/pen/emYPBBB?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const ArcGISMap = await $arcgis.import("@arcgis/core/Map.js");
const VectorTileLayer = await $arcgis.import("@arcgis/core/layers/VectorTileLayer.js");
const Basemap = await $arcgis.import("@arcgis/core/Basemap.js");
const mapBaseLayer = new VectorTileLayer({
  url: "https://arcgis.com/sharing/rest/content/items/b5676525747f499687f12746441101ef/resources/styles/root.json"
});

const customBasemap = new Basemap({
  baseLayers: [mapBaseLayer],
  title: "Terrain",
  id: "terrain",
  thumbnailUrl: "https://arcgis.com/sharing/rest/content/items/b5676525747f499687f12746441101ef/info/thumbnail/ago_downloaded.png"
});

const sceneElement = document.querySelector("arcgis-scene");
await sceneElement.componentOnReady();
sceneElement.map.basemap = customBasemap;&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 28 Mar 2025 21:55:57 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2025-03-28T21:55:57Z</dc:date>
    <item>
      <title>Map Component using custom Basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-component-using-custom-basemap/m-p/1600560#M86775</link>
      <description>&lt;P&gt;Where can I find an example for Map Component using custom Basemap?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forrest&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 19:31:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-component-using-custom-basemap/m-p/1600560#M86775</guid>
      <dc:creator>ForrestLin</dc:creator>
      <dc:date>2025-03-28T19:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Map Component using custom Basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-component-using-custom-basemap/m-p/1600608#M86776</link>
      <description>&lt;P&gt;There's a couple of ways you could do this.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a custom basemap and assign it to element.map.basemap.&lt;/LI&gt;&lt;LI&gt;Create a map with custom basemap and assign the map the element.map&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here is a demo with second option. It's really a preference on your part.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/emYPBBB?editors=1000" target="_blank"&gt;https://codepen.io/odoe/pen/emYPBBB?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const ArcGISMap = await $arcgis.import("@arcgis/core/Map.js");
const VectorTileLayer = await $arcgis.import("@arcgis/core/layers/VectorTileLayer.js");
const Basemap = await $arcgis.import("@arcgis/core/Basemap.js");
const mapBaseLayer = new VectorTileLayer({
  url: "https://arcgis.com/sharing/rest/content/items/b5676525747f499687f12746441101ef/resources/styles/root.json"
});

const customBasemap = new Basemap({
  baseLayers: [mapBaseLayer],
  title: "Terrain",
  id: "terrain",
  thumbnailUrl: "https://arcgis.com/sharing/rest/content/items/b5676525747f499687f12746441101ef/info/thumbnail/ago_downloaded.png"
});

const sceneElement = document.querySelector("arcgis-scene");
await sceneElement.componentOnReady();
sceneElement.map.basemap = customBasemap;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 28 Mar 2025 21:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-component-using-custom-basemap/m-p/1600608#M86776</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2025-03-28T21:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Map Component using custom Basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-component-using-custom-basemap/m-p/1600810#M86779</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use Angular. Should I put element.map.basemap = customBasemap in event? like:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;arcgisViewReadyChange&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;event&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;HTMLArcgisMapElement&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;"arcgisViewReadyChange"&lt;/SPAN&gt;&lt;SPAN&gt;]) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;element&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;event&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;target&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; element.map.basemap = customBasemap&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Forrest&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 31 Mar 2025 12:41:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-component-using-custom-basemap/m-p/1600810#M86779</guid>
      <dc:creator>ForrestLin</dc:creator>
      <dc:date>2025-03-31T12:41:04Z</dc:date>
    </item>
  </channel>
</rss>

