<?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 components with feature layers, why must I specify the basemap twice? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660994#M87809</link>
    <description>&lt;P&gt;After viewOnReady, the viewElement.map is already defined, you don't need to set it to a new Map object, you just need to add the parks layer to the existing map.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const viewElement = document.querySelector("arcgis-map");
await viewElement.viewOnReady();
viewElement.map.add(parksLayer);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Oct 2025 15:46:38 GMT</pubDate>
    <dc:creator>Justin_Greco</dc:creator>
    <dc:date>2025-10-27T15:46:38Z</dc:date>
    <item>
      <title>Map components with feature layers, why must I specify the basemap twice?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660984#M87806</link>
      <description>&lt;P&gt;I'm curious why I must specify a basemap twice when using a map component, then creating a map object in the JavaScript? For example, in this codepen, if I remove the basemap declaration either in line 27 or line 46, the map breaks. I purposefully put different basemaps to see which one in the end gets used. It's not a huge deal to define it twice, but it seems like it should only have to be once.&lt;/P&gt;&lt;P&gt;&lt;A title="Must define basemap twice" href="https://codepen.io/antoniomedrano/pen/NPxzozJ?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/antoniomedrano/pen/NPxzozJ?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 14:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660984#M87806</guid>
      <dc:creator>AntonioMedrano</dc:creator>
      <dc:date>2025-10-27T14:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Map components with feature layers, why must I specify the basemap twice?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660987#M87807</link>
      <description>&lt;P&gt;You don't need to. You can start with just `&amp;lt;arcgis-map&amp;gt;` and skip the `viewOnReady` and just assign the map.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/RNrJdVv?editors=1000" target="_blank"&gt;https://codepen.io/odoe/pen/RNrJdVv?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This also makes it easier to bind a map in a framework so it could look something like `&amp;lt;arcgis-map map={localMap} /&amp;gt;`&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 15:15:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660987#M87807</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2025-10-27T15:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Map components with feature layers, why must I specify the basemap twice?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660994#M87809</link>
      <description>&lt;P&gt;After viewOnReady, the viewElement.map is already defined, you don't need to set it to a new Map object, you just need to add the parks layer to the existing map.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const viewElement = document.querySelector("arcgis-map");
await viewElement.viewOnReady();
viewElement.map.add(parksLayer);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 15:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660994#M87809</guid>
      <dc:creator>Justin_Greco</dc:creator>
      <dc:date>2025-10-27T15:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Map components with feature layers, why must I specify the basemap twice?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660996#M87810</link>
      <description>&lt;P&gt;Both of these approaches work, and I see why my original approach had it's behavior. Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/233731"&gt;@Justin_Greco&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 15:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-components-with-feature-layers-why-must-i/m-p/1660996#M87810</guid>
      <dc:creator>AntonioMedrano</dc:creator>
      <dc:date>2025-10-27T15:53:55Z</dc:date>
    </item>
  </channel>
</rss>

