I got a 2D widget build in WebappBuilder
In the Settings.js I got the ability to configure some stuff for each layer of the map.
The code to access the layers (array) is:
<SPAN class="string token">"jimu/LayerStructure"</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="keyword token">var</SPAN> layerStructure <SPAN class="operator token">=</SPAN> LayerStructure<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getInstance</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> layerNodes <SPAN class="operator token">=</SPAN> layerStructure<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getLayerNodes</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I read https://developers.arcgis.com/web-appbuilder/guide/3d-development-guide.htm
It says. The Settings.js uses the 3.x and the Widget the 4.x API.
No I want to access get the layernodes (?) of a 3D map (sceneView) in the Settings.js
How do I achieve this?
Edit: I can get the layerNodes by
<SPAN class="keyword token">var</SPAN> layerNodes <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>sceneView<SPAN class="punctuation token">.</SPAN>map<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>