<?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 Esri JS API 4.11: No Layerview has been found for the layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-11-no-layerview-has-been-found-for/m-p/560557#M52301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting the error:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;message&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;No layerview has been found for the layer&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;name&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;view:no-layerview-for-layer&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN class="" style="color: #222222;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;for the FeatureLayer that's been created from the graphics using the&amp;nbsp;&lt;STRONG&gt;source&lt;/STRONG&gt; property. Despite it, the symbols and labels draw just fine, but I need a view to watch some properties of the view !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know&amp;nbsp;&lt;STRONG&gt;why&lt;/STRONG&gt; there is no view for such layers. If you think / know that each FeatureLayer should have the view and this is a bug and require more code, please let me know, but it's a standard FeatureLayer from graphics and then on&amp;nbsp;&lt;STRONG&gt;SceneView.whenLayerView&lt;/STRONG&gt; is just throwing the error in the err-callback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Codepen (follow the sample instructions -&amp;gt; download shapefile -&amp;gt; upload shapefile and watch the layerview fail in console):&lt;BR /&gt;&lt;A href="https://codepen.io/anon/pen/mYGwzK?editors=1001#anon-login"&gt;https://codepen.io/anon/pen/mYGwzK?editors=1001#anon-login&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 May 2019 08:02:28 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2019-05-29T08:02:28Z</dc:date>
    <item>
      <title>Esri JS API 4.11: No Layerview has been found for the layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-11-no-layerview-has-been-found-for/m-p/560557#M52301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting the error:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;message&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;No layerview has been found for the layer&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;name&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;view:no-layerview-for-layer&lt;SPAN class="" style="color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN class="" style="color: #222222;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;for the FeatureLayer that's been created from the graphics using the&amp;nbsp;&lt;STRONG&gt;source&lt;/STRONG&gt; property. Despite it, the symbols and labels draw just fine, but I need a view to watch some properties of the view !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know&amp;nbsp;&lt;STRONG&gt;why&lt;/STRONG&gt; there is no view for such layers. If you think / know that each FeatureLayer should have the view and this is a bug and require more code, please let me know, but it's a standard FeatureLayer from graphics and then on&amp;nbsp;&lt;STRONG&gt;SceneView.whenLayerView&lt;/STRONG&gt; is just throwing the error in the err-callback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Codepen (follow the sample instructions -&amp;gt; download shapefile -&amp;gt; upload shapefile and watch the layerview fail in console):&lt;BR /&gt;&lt;A href="https://codepen.io/anon/pen/mYGwzK?editors=1001#anon-login"&gt;https://codepen.io/anon/pen/mYGwzK?editors=1001#anon-login&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2019 08:02:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-11-no-layerview-has-been-found-for/m-p/560557#M52301</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-05-29T08:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Esri JS API 4.11: No Layerview has been found for the layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-11-no-layerview-has-been-found-for/m-p/560558#M52302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code for `view.whenLayerView` logic is running before you add the layer to the map. LayerView for the layer will be created&amp;nbsp;when the layer is loaded to the view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So either move your code out of the current function and place after you add the layer to the map or do something like the following then you will get the layerView back:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; map&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;featureLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;goTo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;whenLayerView&lt;/SPAN&gt;&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="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerView &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'we have the layer view.'&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;error&lt;SPAN class="punctuation token"&gt;)&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="punctuation token"&gt;{&lt;/SPAN&gt;
  console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'we dont have the layer view: '&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; error&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="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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-11-no-layerview-has-been-found-for/m-p/560558#M52302</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-12-12T00:11:16Z</dc:date>
    </item>
  </channel>
</rss>

