AnsweredAssumed Answered

Can't access "visible" property in allSubLayers property

Question asked by bkvannostrand on Jan 30, 2019
Latest reply on Jan 30, 2019 by bkvannostrand

Hi all,

 

I'm trying to hit the properties of the sublayers in a map image service using the "allSublayers" property of that service. It works fine in the console in Chrome:

 

 allSublayers output

 

I can hit each of these items and access the properties of each:

 

allSublayers index

 

But when I try to hit the same in code, using the same syntax, but targeting a new MapLayer object that's being added to the map, I can only see up to the array of sublayers itself, and not access any of the records in that array, nor the properties of any of those records:

asdasd

Looking for the items array

 

items array

the returned items array

 

 

Items Index

looking for the first record in that array

 

undefined

"undefined"

 

Any ideas? Is this some bug or something?

 

Thanks!

Outcomes