<?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 Scene can't read Basemap type in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1647141#M87569</link>
    <description>&lt;P&gt;When I use&amp;nbsp; '@arcgis/map-components/components/arcgis-scene',&lt;/P&gt;&lt;P&gt;It was nice when set basemap by string,&lt;BR /&gt;such as:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;arcgis-scene&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;basemap&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"satellite"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ground&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"world-elevation"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/arcgis-scene&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;but it throw error and didn't work when set&amp;nbsp;basemap by Basemap type,&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;such as:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;SPAN&gt;import Basemap from '@arcgis/core/Basemap';&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;arcgis-scene&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;basemap&lt;/SPAN&gt;&lt;SPAN&gt;=Basemap.fromId('satellite'),&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ground&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"world-elevation"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/arcgis-scene&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;The Error info:&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;Logger.js:5 [esri.support.basemapUtils] Unable to find basemap definition for: [object Object]. Try one of these: "dark-gray", "dark-gray-3d", "dark-gray-vector", "gray", "gray-3d", "gray-vector", "hybrid", "navigation-3d", "navigation-dark-3d", "oceans", "osm", "osm-3d", "satellite", "streets", "streets-3d", "streets-dark-3d", "streets-navigation-vector", "streets-night-vector", "streets-relief-vector", "streets-vector", "terrain", "topo", "topo-3d", "topo-vector"&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;DIV&gt;By the way, I guess it's web-component problem, I test Popup type, it's work. So maybe it's&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;/map-components bug.&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 01 Sep 2025 09:38:25 GMT</pubDate>
    <dc:creator>DaoYu</dc:creator>
    <dc:date>2025-09-01T09:38:25Z</dc:date>
    <item>
      <title>Scene can't read Basemap type</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1647141#M87569</link>
      <description>&lt;P&gt;When I use&amp;nbsp; '@arcgis/map-components/components/arcgis-scene',&lt;/P&gt;&lt;P&gt;It was nice when set basemap by string,&lt;BR /&gt;such as:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;arcgis-scene&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;basemap&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"satellite"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ground&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"world-elevation"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/arcgis-scene&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;but it throw error and didn't work when set&amp;nbsp;basemap by Basemap type,&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;such as:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;SPAN&gt;import Basemap from '@arcgis/core/Basemap';&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;arcgis-scene&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;basemap&lt;/SPAN&gt;&lt;SPAN&gt;=Basemap.fromId('satellite'),&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ground&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"world-elevation"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/arcgis-scene&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;The Error info:&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;Logger.js:5 [esri.support.basemapUtils] Unable to find basemap definition for: [object Object]. Try one of these: "dark-gray", "dark-gray-3d", "dark-gray-vector", "gray", "gray-3d", "gray-vector", "hybrid", "navigation-3d", "navigation-dark-3d", "oceans", "osm", "osm-3d", "satellite", "streets", "streets-3d", "streets-dark-3d", "streets-navigation-vector", "streets-night-vector", "streets-relief-vector", "streets-vector", "terrain", "topo", "topo-3d", "topo-vector"&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;DIV&gt;By the way, I guess it's web-component problem, I test Popup type, it's work. So maybe it's&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;/map-components bug.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Sep 2025 09:38:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1647141#M87569</guid>
      <dc:creator>DaoYu</dc:creator>
      <dc:date>2025-09-01T09:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scene can't read Basemap type</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1647182#M87570</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/480921"&gt;@DaoYu&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;thanks for your question.&lt;BR /&gt;&lt;BR /&gt;This behavior doesn't seem to be a bug because, by design of web components, HTML attributes (e.g. &amp;lt;arcgis-scene &lt;STRONG&gt;basemap&lt;/STRONG&gt;="..."&amp;gt;) are limited to &lt;STRONG&gt;string&lt;/STRONG&gt; values. On the other side, the same component HTML attribute can be accessed programmatically using it's corresponding JavaScript property which can hold complex data types (e.g. an object like `Basemap`).&lt;/P&gt;&lt;P&gt;So, when you attempt to assign a Basemap object to an HTML attribute, the object is considered as "[object Object]" string (as you can see in the error above-mentioned). The scene component then receives this string and tries, unsuccessfully, to find a basemap with that name.&lt;/P&gt;&lt;P&gt;The correct approach in your scenario is to use JavaScript to assign &lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;Basemap.fromId('satellite')&lt;/FONT&gt;&amp;nbsp;&lt;/SPAN&gt;to the component's basemap property after the element has been initialized.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HTML (attribute)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;arcgis-scene basemap="satellite"&amp;gt;&amp;lt;/arcgis-scene&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JavaScript (property)&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import Basemap from '@arcgis/core/Basemap';

const viewElement = document.querySelector("arcgis-scene");

viewElement.viewOnReady(async () =&amp;gt; {
  viewElement.basemap = Basemap.fromId("satellite");
});&lt;/LI-CODE&gt;&lt;P&gt;Here you can find a simple CodePen:&amp;nbsp;&lt;A href="https://codepen.io/rizmat/pen/GgpwZbK" target="_self"&gt;https://codepen.io/rizmat/pen/GgpwZbK&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this will help you. If you want to have a better overview of attributes and/or properties of the Scene component, check out the &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/#properties" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/#properties&lt;/A&gt;&amp;nbsp;documentation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 15:39:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1647182#M87570</guid>
      <dc:creator>MatteoRizzi1</dc:creator>
      <dc:date>2025-09-01T15:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Scene can't read Basemap type</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1647229#M87572</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I understand the&amp;nbsp;&lt;SPAN&gt;HTML attribute you means. But Popup can work, Basemap can't. What are the differences between the two？They are both strings.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const popup = new Popup({ 
  dockEnabled: true, 
  dockOptions: { 
    position: "top-left", 
    breakpoint: false 
});&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;arcgis-scene
basemap="satellite"
ground="world-elevation"
popup=popup
&amp;gt;&amp;lt;/arcgis-scene&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The second things, I want to add a c&lt;SPAN&gt;ustom&amp;nbsp;&lt;/SPAN&gt;basemap. I followed your answer, it worked.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    &amp;lt;arcgis-scene ref={ref} basemap="satellite" &amp;gt;&amp;lt;/arcgis-scene&amp;gt;

    ref.current.addEventListener('arcgisViewReadyChange', () =&amp;gt; {
      ref.current.basemap = basemap; // my custom basemap
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But you must set basemap="satellite" in HTML fisrtly, I think it should be set my custom basemap directly instead of “satellite”.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 01:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1647229#M87572</guid>
      <dc:creator>DaoYu</dc:creator>
      <dc:date>2025-09-02T01:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Scene can't read Basemap type</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1648188#M87590</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;/map-components/components/arcgis-basemap-toggle has the same problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 09:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scene-can-t-read-basemap-type/m-p/1648188#M87590</guid>
      <dc:creator>DaoYu</dc:creator>
      <dc:date>2025-09-05T09:43:08Z</dc:date>
    </item>
  </channel>
</rss>

