AnsweredAssumed Answered

ArcGIS JavaScript API: How to retrieve the first FeatureLayer from WebScene?

Question asked by jholden987 on Oct 18, 2018
Latest reply on Oct 21, 2018 by jholden987

Hey everyone, I am currently pulling the FeatureLayer by its name and applying ElevationInfo onto it.

// Retrieve FeatureLayer from WebScene           
var featureLayer3D = map3D.layers.find(function(layer){             
return layer.title === "Env 09092018";  

// Define elevationInfo and set it on the layer           
var currentElevationInfo = {             
: "absolute-height",             
: -20,             
: "meters"           
.elevationInfo = currentElevationInfo;

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!