Hey everyone, I am currently pulling the FeatureLayer by its name and applying ElevationInfo onto it.
<SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> map3D</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">when</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">(</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">function</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">(){</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">// Retrieve FeatureLayer from WebScene</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">var</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> featureLayer3D </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> map3D</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">layers</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">find</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">(</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">function</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">(</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">layer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">){</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">return</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> layer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">title </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">===</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"Env 09092018"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">;</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">});</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">// Define elevationInfo and set it on the layer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">var</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> currentElevationInfo </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">{</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
mode</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">:</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"absolute-height"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
offset</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">:</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">-</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">20</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
unit</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">:</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"meters"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">};</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
featureLayer3D</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">elevationInfo </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> currentElevationInfo</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">;
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">});</SPAN>I was wondering is there a way to retrieve by calling the first FeatureLayer as opposed to calling by the name(Env 09092018) itself? Thanks in advance!