I am using a webmap in my mapview. Once the view is ready (i.e. after view.when()), I do the following to produce the output on the right in the image below:
let layers = view.map.allLayers
console.log("layers.length = ", layers.length)
for (const l of layers){
console.log(`${l.title} - (${l.type})`)
}
For comparison, the table of contents for the webmap that I'm using is shown on the left side of the image below. The problem I'm having is that the '2020-2029 STIP Points' and the '2020-2029 STIP Lines' layers are not showing up in the output. In the output the group shows up as a map image but the layers underneath are feature layers. Could it be because the layers begin with numbers?