<?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 Can a feature layer be added to a webmap object in ArcGIS Javascript 4.13? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502959#M46703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a regular map object, you can add a layer with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layers: [layer1, layer2]&lt;/P&gt;&lt;P&gt;or by using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.add(layer1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you do this same thing with a WebMap object?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;webmap.add(layer1) doesn't work for me and neither does adding the layers: [layer1, layer2]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2020 16:18:16 GMT</pubDate>
    <dc:creator>EdFratto</dc:creator>
    <dc:date>2020-03-09T16:18:16Z</dc:date>
    <item>
      <title>Can a feature layer be added to a webmap object in ArcGIS Javascript 4.13?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502959#M46703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a regular map object, you can add a layer with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layers: [layer1, layer2]&lt;/P&gt;&lt;P&gt;or by using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.add(layer1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you do this same thing with a WebMap object?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;webmap.add(layer1) doesn't work for me and neither does adding the layers: [layer1, layer2]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502959#M46703</guid>
      <dc:creator>EdFratto</dc:creator>
      <dc:date>2020-03-09T16:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can a feature layer be added to a webmap object in ArcGIS Javascript 4.13?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502960#M46704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you can. Starting with this &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/webmap-basic/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;sample&lt;/A&gt;, I'm adding a FeatureLayer of county poverty data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;html&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;head&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;meta charset&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"utf-8"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;meta
      name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"viewport"&lt;/SPAN&gt;
      content&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"initial-scale=1,maximum-scale=1,user-scalable=no"&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;--&lt;/SPAN&gt;
  ArcGIS API &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; JavaScript&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; https&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;js&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;com
  For more information about the webmap&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;basic sample&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; read the original sample description at developers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;com&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
  https&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;developers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;com&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;javascript&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;latest&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;sample&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;code&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;webmap&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;basic&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;index&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;html
  &lt;SPAN class="operator token"&gt;--&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;title&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;Load a basic WebMap &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4.13&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;title&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;

    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;style&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
      html&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      body&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      #viewDiv &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        padding&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        margin&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        height&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        width&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;style&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;

    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;link
      rel&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"stylesheet"&lt;/SPAN&gt;
      href&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://js.arcgis.com/4.13/esri/themes/light/main.css"&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;

    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;script src&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://js.arcgis.com/4.13/"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;script&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;

    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;script&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class="token function"&gt;require&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"esri/views/MapView"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"esri/WebMap"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"esri/layers/FeatureLayer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;MapView&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; WebMap&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;/************************************************************
         * Creates a new WebMap instance. A WebMap must reference
         * a PortalItem ID that represents a WebMap saved to
         * arcgis.com or an on-premise portal.
         *
         * To load a WebMap from an on-premise portal, set the portal
         * url with esriConfig.portalUrl.
         ************************************************************/&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; webmap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;WebMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          portalItem&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;// autocasts as new PortalItem()&lt;/SPAN&gt;
            id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"f2e9b762544945f390ca4ac3671cfa72"&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;/************************************************************
         * Set the WebMap instance to the map property in a MapView.
         ************************************************************/&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; view &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MapView&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          map&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; webmap&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
          container&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"viewDiv"&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          url&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/counties_politics_poverty/FeatureServer/0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
          outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        
        webmap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;script&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;head&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;

  &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;body&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;div id&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"viewDiv"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;div&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;body&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;html&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:04:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502960#M46704</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T22:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can a feature layer be added to a webmap object in ArcGIS Javascript 4.13?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502961#M46705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, examples are so helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:37:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502961#M46705</guid>
      <dc:creator>EdFratto</dc:creator>
      <dc:date>2020-03-09T16:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can a feature layer be added to a webmap object in ArcGIS Javascript 4.13?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502962#M46706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this has answered your question, please click the Mark Correct button.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/502962#M46706</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2020-03-09T16:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can a feature layer be added to a webmap object in ArcGIS Javascript 4.13?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/1011927#M71178</link>
      <description>&lt;P&gt;This method adds the layer below the webmap. So if the webmap has opacity as 1 the layer is not visible. Anyone know the solution for that?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 23:47:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/1011927#M71178</guid>
      <dc:creator>YashMore</dc:creator>
      <dc:date>2020-12-22T23:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can a feature layer be added to a webmap object in ArcGIS Javascript 4.13?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/1057030#M73057</link>
      <description>&lt;P&gt;The problem here is the index of the layer. When the WebMap loads the layers from the portal, they seem to be appended to the existing list (which contains your layer). Since your layer is now on the top of the list, it will be rendered first, then everything else on top of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My approach to solving this is to&lt;/P&gt;&lt;P&gt;1) Create the WebMap (and MapView)&lt;/P&gt;&lt;P&gt;2) Wait for WebMap to load, using the &lt;STRONG&gt;&lt;EM&gt;.when()&lt;/EM&gt;&lt;/STRONG&gt; method&lt;/P&gt;&lt;P&gt;3) In the function provided to &lt;STRONG&gt;&lt;EM&gt;.when()&lt;/EM&gt;&lt;/STRONG&gt;,&amp;nbsp; add your own layer(s) using&lt;STRONG&gt; &lt;EM&gt;.add(layer, index)&lt;/EM&gt;&lt;/STRONG&gt; or&lt;STRONG&gt; &lt;EM&gt;.addMany([layers], index)&lt;/EM&gt;&lt;/STRONG&gt; if you got several. The index is the amount of existing layers, found in&lt;STRONG&gt; &lt;EM&gt;WebMap.allLayers.length&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pseudo code example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    const webMap = new WebMap({
        portalItem: ...
      });

    webMap.when(() =&amp;gt; {
       webMap.add(myFeaureLayer, webMap.allLayers.length);
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 10:33:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-a-feature-layer-be-added-to-a-webmap-object-in/m-p/1057030#M73057</guid>
      <dc:creator>Oyvind</dc:creator>
      <dc:date>2021-05-12T10:33:54Z</dc:date>
    </item>
  </channel>
</rss>

